API java : Modifier


java.lang.reflect
Class Modifier

java.lang.Object
  extended by java.lang.reflect.Modifier

public class Modifier
extends Object

The Modifier class provides static methods and constants to decode class and member access modifiers. The sets of modifiers are represented as integers with distinct bit positions representing different modifiers. The values for the constants representing the modifiers are taken from The JavaTM Virtual Machine Specification, Second edition tables 4.1, 4.4, 4.5, and 4.7.

See Also:
Class.getModifiers(), Member.getModifiers()

Field Summary
static int ABSTRACT
          The int value representing the abstract modifier.
static int FINAL
          The int value representing the final modifier.
static int INTERFACE
          The int value representing the interface modifier.
static int NATIVE
          The int value representing the native modifier.
static int PRIVATE
          The int value representing the private modifier.
static int PROTECTED
          The int value representing the protected modifier.
static int PUBLIC
          The int value representing the public modifier.
static int STATIC
          The int value representing the static modifier.
static int STRICT
          The int value representing the strictfp modifier.
static int SYNCHRONIZED
          The int value representing the synchronized modifier.
static int TRANSIENT
          The int value representing the transient modifier.
static int VOLATILE
          The int value representing the volatile modifier.
 
Constructor Summary
Modifier()
           
 
Method Summary
static boolean isAbstract(int mod)
          Return true if the integer argument includes the abstract modifier, false otherwise.
static boolean isFinal(int mod)
          Return true if the integer argument includes the final modifier, false otherwise.
static boolean isInterface(int mod)
          Return true if the integer argument includes the interface modifier, false otherwise.
static boolean isNative(int mod)
          Return true if the integer argument includes the native modifier, false otherwise.
static boolean isPrivate(int mod)
          Return true if the integer argument includes the private modifier, false otherwise.
static boolean isProtected(int mod)
          Return true if the integer argument includes the protected modifier, false otherwise.
static boolean isPublic(int mod)
          Return true if the integer argument includes the public modifier, false otherwise.
static boolean isStatic(int mod)
          Return true if the integer argument includes the static modifier, false otherwise.
static boolean isStrict(int mod)
          Return true if the integer argument includes the strictfp modifier, false otherwise.
static boolean isSynchronized(int mod)
          Return true if the integer argument includes the synchronized modifier, false otherwise.
static boolean isTransient(int mod)
          Return true if the integer argument includes the transient modifier, false otherwise.
static boolean isVolatile(int mod)
          Return true if the integer argument includes the volatile modifier, false otherwise.
static String toString(int mod)
          Return a string describing the access modifier flags in the specified modifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC

public static final int PUBLIC
The int value representing the public modifier.

See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
The int value representing the private modifier.

See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
The int value representing the protected modifier.

See Also:
Constant Field Values

STATIC

public static final int STATIC
The int value representing the static modifier.

See Also:
Constant Field Values

FINAL

public static final int FINAL
The int value representing the final modifier.

See Also:
Constant Field Values

SYNCHRONIZED

public static final int SYNCHRONIZED
The int value representing the synchronized modifier.

See Also:
Constant Field Values

VOLATILE

public static final int VOLATILE
The int value representing the volatile modifier.

See Also:
Constant Field Values

TRANSIENT

public static final int TRANSIENT
The int value representing the transient modifier.

See Also:
Constant Field Values

NATIVE

public static final int NATIVE
The int value representing the native modifier.

See Also:
Constant Field Values

INTERFACE

public static final int INTERFACE
The int value representing the interface modifier.

See Also:
Constant Field Values

ABSTRACT

public static final int ABSTRACT
The int value representing the abstract modifier.

See Also:
Constant Field Values

STRICT

public static final int STRICT
The int value representing the strictfp modifier.

See Also:
Constant Field Values
Constructor Detail

Modifier

public Modifier()
Method Detail

isPublic

public static boolean isPublic(int mod)
Return true if the integer argument includes the public modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the public modifier; false otherwise.

isPrivate

public static boolean isPrivate(int mod)
Return true if the integer argument includes the private modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the private modifier; false otherwise.

isProtected

public static boolean isProtected(int mod)
Return true if the integer argument includes the protected modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the protected modifier; false otherwise.

isStatic

public static boolean isStatic(int mod)
Return true if the integer argument includes the static modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the static modifier; false otherwise.

isFinal

public static boolean isFinal(int mod)
Return true if the integer argument includes the final modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the final modifier; false otherwise.

isSynchronized

public static boolean isSynchronized(int mod)
Return true if the integer argument includes the synchronized modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the synchronized modifier; false otherwise.

isVolatile

public static boolean isVolatile(int mod)
Return true if the integer argument includes the volatile modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the volatile modifier; false otherwise.

isTransient

public static boolean isTransient(int mod)
Return true if the integer argument includes the transient modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the transient modifier; false otherwise.

isNative

public static boolean isNative(int mod)
Return true if the integer argument includes the native modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the native modifier; false otherwise.

isInterface

public static boolean isInterface(int mod)
Return true if the integer argument includes the interface modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the interface modifier; false otherwise.

isAbstract

public static boolean isAbstract(int mod)
Return true if the integer argument includes the abstract modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the abstract modifier; false otherwise.

isStrict

public static boolean isStrict(int mod)
Return true if the integer argument includes the strictfp modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the strictfp modifier; false otherwise.

toString

public static String toString(int mod)
Return a string describing the access modifier flags in the specified modifier. For example:
  1. public final synchronized strictfp
The modifier names are returned in an order consistent with the suggested modifier orderings given in The Java Language Specification, Second Edition sections §8.1.1, §8.3.1, §8.4.3, §8.8.3, and §9.1.1. The full modifier ordering used by this method is:
public protected private abstract static final transient volatile synchronized native strictfp interface
The interface modifier discussed in this class is not a true modifier in the Java language and it appears after all other modifiers listed by this method. This method may return a string of modifiers that are not valid modifiers of a Java entity; in other words, no checking is done on the possible validity of the combination of modifiers represented by the input.

Parameters:
mod - a set of modifiers
Returns:
a string representation of the set of modifiers represented by mod

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-2161
Document créé le 30/08/06 23:48, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-java/lang/reflect/Modifier.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,74 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Sangoku a un poster de Chuck Norris dans sa chambre.

Anonyme [Chuck Norris fact]
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 17:31, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)