API java : OpenType


javax.management.openmbean
Class OpenType

java.lang.Object
  extended by javax.management.openmbean.OpenType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArrayType, CompositeType, SimpleType, TabularType

public abstract class OpenType
extends Object
implements Serializable

The OpenType class is the parent abstract class of all classes which describe the actual open type of open data values.

An open type is defined by:

  • the fully qualified Java class name of the open data values this type describes; note that only a limited set of Java classes is allowed for open data values (see ALLOWED_CLASSNAMES),
  • its name,
  • its description.

Since:
1.5
See Also:
Serialized Form

Field Summary
static String[] ALLOWED_CLASSNAMES
          List of the fully qualified names of the Java classes allowed for open data values.
 
Constructor Summary
protected OpenType(String className, String typeName, String description)
          Constructs an OpenType instance (actually a subclass instance as OpenType is abstract), checking for the validity of the given parameters.
 
Method Summary
abstract  boolean equals(Object obj)
          Compares the specified obj parameter with this open type instance for equality.
 String getClassName()
          Returns the fully qualified Java class name of the open data values this open type describes.
 String getDescription()
          Returns the text description of this OpenType instance.
 String getTypeName()
          Returns the name of this OpenType instance.
abstract  int hashCode()
          Returns a hash code value for the object.
 boolean isArray()
          Returns true if the open data values this open type describes are arrays, false otherwise.
abstract  boolean isValue(Object obj)
          Tests whether obj is a value for this open type.
abstract  String toString()
          Returns a string representation of this open type instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALLOWED_CLASSNAMES

public static final String[] ALLOWED_CLASSNAMES
List of the fully qualified names of the Java classes allowed for open data values. A multidimensional array of any one of these classes is also an allowed for open data values.
  1. ALLOWED_CLASSNAMES = {
  2. "java.lang.Void",
  3. "java.lang.Boolean",
  4. "java.lang.Character",
  5. "java.lang.Byte",
  6. "java.lang.Short",
  7. "java.lang.Integer",
  8. "java.lang.Long",
  9. "java.lang.Float",
  10. "java.lang.Double",
  11. "java.lang.String",
  12. "java.math.BigDecimal",
  13. "java.math.BigInteger",
  14. "java.util.Date",
  15. "javax.management.ObjectName",
  16. CompositeData.class.getName(),
  17. TabularData.class.getName() } ;

Constructor Detail

OpenType

protected OpenType(String className,
                   String typeName,
                   String description)
            throws OpenDataException
Constructs an OpenType instance (actually a subclass instance as OpenType is abstract), checking for the validity of the given parameters. The validity constraints are described below for each parameter.
 

Parameters:
className - The fully qualified Java class name of the open data values this open type describes. The valid Java class names allowed for open data values are listed in ALLOWED_CLASSNAMES. A multidimensional array of any one of these classes is also an allowed class, in which case the class name follows the rules defined by the method getName() of java.lang.Class. For example, a 3-dimensional array of Strings has for class name "[[[Ljava.lang.String;" (without the quotes).
 
typeName - The name given to the open type this instance represents; cannot be a null or empty string.
 
description - The human readable description of the open type this instance represents; cannot be a null or empty string.
 
Throws:
IllegalArgumentException - if className, typeName or description is a null or empty string
 
OpenDataException - if className is not one of the allowed Java class names for open data
Method Detail

getClassName

public String getClassName()
Returns the fully qualified Java class name of the open data values this open type describes. The only possible Java class names for open data values are listed in ALLOWED_CLASSNAMES. A multidimensional array of any one of these classes is also an allowed class, in which case the class name follows the rules defined by the method getName() of java.lang.Class. For example, a 3-dimensional array of Strings has for class name "[[[Ljava.lang.String;" (without the quotes).

Returns:
the class name.

getTypeName

public String getTypeName()
Returns the name of this OpenType instance.

Returns:
the type name.

getDescription

public String getDescription()
Returns the text description of this OpenType instance.

Returns:
the description.

isArray

public boolean isArray()
Returns true if the open data values this open type describes are arrays, false otherwise.

Returns:
true if this is an array type.

isValue

public abstract boolean isValue(Object obj)
Tests whether obj is a value for this open type.

Parameters:
obj - the object to be tested for validity.
Returns:
true if obj is a value for this open type, false otherwise.

equals

public abstract boolean equals(Object obj)
Compares the specified obj parameter with this open type instance for equality.

Overrides:
equals in class Object
Parameters:
obj - the object to compare to.
Returns:
true if this object and obj are equal.
See Also:
Object.hashCode(), Hashtable

hashCode

public abstract int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

toString

public abstract String toString()
Returns a string representation of this open type instance.

Overrides:
toString in class Object
Returns:
the string representation.

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

7 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-2759
Document créé le 31/08/06 03:06, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-javax/management/openmbean/OpenType.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,51 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Comment peut-on croire à ce que l'on crée alors que la publicité donne aux personnages tellement plus de réalité qu'on ne pourrait le rêver ?

Gertrude Stein
 
l'infobrol
Nous sommes le Samedi 02 Juin 2012, 00:29, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)