Java Doc for ArrayType.java in  » JMX » jfoxmx » javax » management » openmbean » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » jfoxmx » javax.management.openmbean 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.management.openmbean.OpenType
      javax.management.openmbean.ArrayType

ArrayType
public class ArrayType extends OpenType implements Serializable(Code)
The ArrayType class is the open type class whose instances describe all open data values which are n-dimensional arrays of open data values.
author:
   Young Yang



Constructor Summary
public  ArrayType(int dimension, OpenType elementType)
     Constructs an ArrayType instance describing open data values which are arrays with dimension dimension of elements whose open type is elementType.

Method Summary
public  booleanequals(Object obj)
     Compares the specified obj parameter with this ArrayType instance for equality.

Two ArrayType instances are equal if and only if they describes array instances which have the same dimension and elements' open type.
Parameters:
  obj - the object to be compared for equality with this ArrayType instance;if obj is null or is not an instance of the class ArrayType,equals returns false.

public  intgetDimension()
     Returns the dimension of arrays described by this ArrayType instance.
public  OpenTypegetElementOpenType()
     Returns the open type of element values contained in the arrays described by this ArrayType instance.
public  inthashCode()
     Returns the hash code value for this ArrayType instance.
public  booleanisValue(Object obj)
     Tests whether obj is a value for this ArrayType instance.

This method returns true if and only if obj is not null, obj is an array and any one of the following is true:

  • if this ArrayType instance describes an array of SimpleType elements, obj's class name is the same as the className field defined for this ArrayType instance (ie the class name returned by the OpenType.getClassName getClassName method, which includes the dimension information),
     
  • if this ArrayType instance describes an array of classes implementing the TabularData interface or the CompositeData interface, obj is assignable to such a declared array, and each element contained in obj is either null or a valid value for the element's open type specified by this ArrayType instance.


Parameters:
  obj - the object to be tested.

public static  voidmain(String[] args)
    
public  StringtoString()
    


Constructor Detail
ArrayType
public ArrayType(int dimension, OpenType elementType) throws OpenDataException(Code)
Constructs an ArrayType instance describing open data values which are arrays with dimension dimension of elements whose open type is elementType.

When invoked on an ArrayType instance, the OpenType.getClassName getClassName method returns the class name of the array instances it describes (following the rules defined by the getNameSpace method of java.lang.Class), not the class name of the array elements (which is returned by a call to getElementOpenType().getClassName()).

The internal field corresponding to the type name of this ArrayType instance is also set to the class name of the array instances it describes. In other words, the methods getClassName and getTypeName return the same string value. The internal field corresponding to the description of this ArrayType instance is set to a string value which follows the following template:
<dimension>-dimension array of <element_class_name>

As an example, the following piece of code:

 ArrayType t = new ArrayType(3, SimpleType.STRING);
 System.out.println("array class name       = "+ t.getClassName());
 System.out.println("element class name     = "+ t.getElementOpenType().getClassName());
 System.out.println("array type name        = "+ t.getTypeName());
 System.out.println("array type description = "+ t.getDescription());
 
would produce the following output:
 array class name       = [[[java.lang.String;
 element class name     = java.lang.String
 array type name        = [[[java.lang.String;
 array type description = 3-dimension array of java.lang.String
 

Parameters:
  dimension - the dimension of arrays described by this ArrayType instance;must be greater than or equal to 1.
Parameters:
  elementType - the open type of element values contained in the arrays described bythis ArrayType instance; must be an instance of eitherSimpleType, CompositeType or TabularType.
throws:
  IllegalArgumentException - if dimension is not a positive integer
throws:
  OpenDataException - if elementType is an instance of ArrayType




Method Detail
equals
public boolean equals(Object obj)(Code)
Compares the specified obj parameter with this ArrayType instance for equality.

Two ArrayType instances are equal if and only if they describes array instances which have the same dimension and elements' open type.
Parameters:
  obj - the object to be compared for equality with this ArrayType instance;if obj is null or is not an instance of the class ArrayType,equals returns false. true if the specified object is equal to this ArrayType instance.




getDimension
public int getDimension()(Code)
Returns the dimension of arrays described by this ArrayType instance. the dimension.



getElementOpenType
public OpenType getElementOpenType()(Code)
Returns the open type of element values contained in the arrays described by this ArrayType instance. the element type.



hashCode
public int hashCode()(Code)
Returns the hash code value for this ArrayType instance.

The hash code of a ArrayType instance is the sum of the hash codes of all elements of information used in equals comparisons (ie: dimension and elements' type). This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two ArrayType instances t1 and t2, as required by the general contract of the method Object.hashCode .

As ArrayType instances are immutable, the hash code for this instance is calculated once, on the first call to hashCode, and then the same value is returned for subsequent calls. the hash code value for this ArrayType instance




isValue
public boolean isValue(Object obj)(Code)
Tests whether obj is a value for this ArrayType instance.

This method returns true if and only if obj is not null, obj is an array and any one of the following is true:

  • if this ArrayType instance describes an array of SimpleType elements, obj's class name is the same as the className field defined for this ArrayType instance (ie the class name returned by the OpenType.getClassName getClassName method, which includes the dimension information),
     
  • if this ArrayType instance describes an array of classes implementing the TabularData interface or the CompositeData interface, obj is assignable to such a declared array, and each element contained in obj is either null or a valid value for the element's open type specified by this ArrayType instance.


Parameters:
  obj - the object to be tested. true if obj is a value for this ArrayType instance.




main
public static void main(String[] args) throws Exception(Code)



toString
public String toString()(Code)



Fields inherited from javax.management.openmbean.OpenType
final public static String[] ALLOWED_CLASSNAMES(Code)(Java Doc)
final protected static String BIGDECIMAL_CLASSNAME(Code)(Java Doc)
final protected static String BIGINTEGER_CLASSNAME(Code)(Java Doc)
final protected static String BOOLEAN_CLASSNAME(Code)(Java Doc)
final protected static String BYTE_CLASSNAME(Code)(Java Doc)
final protected static String CHARACTER_CLASSNAME(Code)(Java Doc)
final protected static String COMPOSITEDATA_CLASSNAME(Code)(Java Doc)
final protected static String DATE_CLASSNAME(Code)(Java Doc)
final protected static String DOUBLE_CLASSNAME(Code)(Java Doc)
final protected static String FLOAT_CLASSNAME(Code)(Java Doc)
final protected static String INTEGER_CLASSNAME(Code)(Java Doc)
final protected static String LONG_CLASSNAME(Code)(Java Doc)
final protected static String OBJECTNAME_CLASSNAME(Code)(Java Doc)
final protected static String SHORT_CLASSNAME(Code)(Java Doc)
final protected static String STRING_CLASSNAME(Code)(Java Doc)
final protected static String TABULARDATA_CLASSNAME(Code)(Java Doc)
final protected static String VOID_CLASSNAME(Code)(Java Doc)

Methods inherited from javax.management.openmbean.OpenType
abstract public boolean equals(Object obj)(Code)(Java Doc)
public String getClassName()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public String getTypeName()(Code)(Java Doc)
abstract public int hashCode()(Code)(Java Doc)
public boolean isArray()(Code)(Java Doc)
abstract public boolean isValue(Object obj)(Code)(Java Doc)
abstract public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.