java.lang.reflect

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » lang » java.lang.reflect 
java.lang.reflect
Provides classes and interfaces for obtaining reflective information about classes and objects.
Java Source File NameTypeComment
AccessibleObject.javaClass The AccessibleObject class is the base class for Field, Method and Constructor objects.
AnnotatedElement.javaInterface Represents an annotated element of the program currently running in this VM.
Array.javaClass The Array class provides static methods to dynamically create and access Java arrays.
Constructor.javaClass Constructor provides information about, and access to, a single constructor for a class.
Field.javaClass A Field provides information about, and dynamic access to, a single field of a class or an interface.
GenericArrayType.javaInterface GenericArrayType represents an array type whose component type is either a parameterized type or a type variable.
GenericDeclaration.javaInterface A common interface for all entities that declare type variables.
GenericSignatureFormatError.javaClass 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.
InvocationHandler.javaInterface InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
InvocationTargetException.javaClass InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor.

As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism.

MalformedParameterizedTypeException.javaClass Thrown when a semantically malformed parameterized type is encountered by a reflective method that needs to instantiate it.
Member.javaInterface Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
Method.javaClass A Method provides information about, and access to, a single method on a class or interface.
Modifier.javaClass The Modifier class provides static methods and constants to decode class and member access modifiers.
package-info.java
ParameterizedType.javaInterface ParameterizedType represents a parameterized type such as Collection<String>.

A parameterized type is created the first time it is needed by a reflective method, as specified in this package.

Proxy.javaClass 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.

To create a proxy for some interface Foo :

 InvocationHandler handler = new MyInvocationHandler(...);
 Class proxyClass = Proxy.getProxyClass(
 Foo.class.getClassLoader(), new Class[] { Foo.class });
 Foo f = (Foo) proxyClass.
 getConstructor(new Class[] { InvocationHandler.class }).
 newInstance(new Object[] { handler });
 
or more simply:
 Foo f = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
 new Class[] { Foo.class },
 handler);
 

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, with behavior as described below. A proxy interface is such an interface that is implemented by a proxy class. A proxy instance is an instance of a proxy class. Each proxy instance has an associated invocation handler object, which implements the interface InvocationHandler . A method invocation on a proxy instance through one of its proxy interfaces will be dispatched to the InvocationHandler.invokeinvoke method of the instance's invocation handler, passing the proxy instance, a java.lang.reflect.Method object identifying the method that was invoked, and an array of type Object containing the arguments.

ReflectAccess.javaClass Package-private class implementing the sun.reflect.LangReflectAccess interface, allowing the java.lang package to instantiate objects in this package.
ReflectPermission.javaClass The Permission class for reflective operations.
Type.javaInterface Type is the common superinterface for all types in the Java programming language.
TypeVariable.javaInterface TypeVariable is the common superinterface for type variables of kinds. A type variable is created the first time it is needed by a reflective method, as specified in this package.
UndeclaredThrowableException.javaClass Thrown by a method invocation on a proxy instance if its invocation handler's InvocationHandler.invoke 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.

An UndeclaredThrowableException instance contains the undeclared checked exception that was thrown by the invocation handler, and it can be retrieved with the getUndeclaredThrowable() method. UndeclaredThrowableException extends RuntimeException , so it is an unchecked exception that wraps a checked exception.

As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism.

WildcardType.javaInterface WildcardType represents a wildcard type expression, such as ? , ? extends Number , or ? super Integer .
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.