|
NOTA: La traducción de esta documentación es un esfuerzo personal y voluntario, no es un documento oficial de Sun Microsystems
ni Oracle ni está patrocinado por ninguna de estas empresas. Los documentos originales (en inglés) están disponibles en:
http://java.sun.com/docs/books/tutorial/.
Dirija cualquier comentario, petición, felicitación, etc. a tutorialesjava_@RROBA_codexion.com. |
Si desea ayudar a mantener en funcionamiento esta web, colaborar con la traducción de estos documentos o necesita que se traduzca algĂșn capĂtulo en concreto puede realizar una donación directa mediante Paypal:
|
Every object is either a reference or primitive type. Reference types all inherit fromjava.lang.Object. Classes, enums, arrays, and interfaces are all reference types. There is a fixed set of primitive types:boolean,byte,short,int,long,char,float, anddouble. Examples of reference types includejava.lang.String, all of the wrapper classes for primitive types such asjava.lang.Double, the interfacejava.io.Serializable, and the enumjavax.swing.SortOrder.For every type of object, the Java virtual machine instantiates an immutable instance of
java.lang.Classwhich provides methods to examine the runtime properties of the object including its members and type information.Classalso provides the ability to create new classes and objects. Most importantly, it is the entry point for all of the Reflection APIs. This lesson covers the most commonly used reflection operations involving classes:
- Retrieving Class Objects describes the ways to get a
Class- Examining Class Modifiers and Types shows how to access the class declaration information
- Discovering Class Members illustrates how to list the constructors, fields, methods, and nested classes in a class
- Troubleshooting describes common errors encountered when using
Class