Java Doc for ReflectionFactory.java in  » 6.0-JDK-Modules-sun » reflect » sun » reflect » 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 » 6.0 JDK Modules sun » reflect » sun.reflect 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.reflect.ReflectionFactory

ReflectionFactory
public class ReflectionFactory (Code)

The master factory for all reflective objects, both those in java.lang.reflect (Fields, Methods, Constructors) as well as their delegates (FieldAccessors, MethodAccessors, ConstructorAccessors).

The methods in this class are extremely unsafe and can cause subversion of both the language and the verifier. For this reason, they are all instance methods, and access to the constructor of this factory is guarded by a security check, in similar style to sun.misc.Unsafe .


Inner Class :final public static class GetReflectionFactoryAction implements PrivilegedAction



Method Summary
public  ConstructorcopyConstructor(Constructor arg)
     Makes a copy of the passed constructor.
public  FieldcopyField(Field arg)
     Makes a copy of the passed field.
public  MethodcopyMethod(Method arg)
     Makes a copy of the passed method.
public  ConstructorAccessorgetConstructorAccessor(Constructor c)
    
public  MethodAccessorgetMethodAccessor(Method m)
    
public static  ReflectionFactorygetReflectionFactory()
     Provides the caller with the capability to instantiate reflective objects.

First, if there is a security manager, its checkPermission method is called with a java.lang.RuntimePermission with target "reflectionFactoryAccess".

static  intinflationThreshold()
    
public  ConstructornewConstructor(Class declaringClass, Class[] parameterTypes, Class[] checkedExceptions, int modifiers, int slot, String signature, byte[] annotations, byte[] parameterAnnotations)
     Creates a new java.lang.reflect.Constructor.
public  ConstructorAccessornewConstructorAccessor(Constructor c)
    
public  ConstructornewConstructorForSerialization(Class classToInstantiate, Constructor constructorToCall)
    
public  FieldnewField(Class declaringClass, String name, Class type, int modifiers, int slot, String signature, byte[] annotations)
     Creates a new java.lang.reflect.Field.
public  FieldAccessornewFieldAccessor(Field field, boolean override)
     Note: this routine can cause the declaring class for the field be initialized and therefore must not be called until the first get/set of this field.
public  MethodnewMethod(Class declaringClass, String name, Class[] parameterTypes, Class returnType, Class[] checkedExceptions, int modifiers, int slot, String signature, byte[] annotations, byte[] parameterAnnotations, byte[] annotationDefault)
     Creates a new java.lang.reflect.Method.
public  MethodAccessornewMethodAccessor(Method method)
    
public  voidsetConstructorAccessor(Constructor c, ConstructorAccessor accessor)
    
public  voidsetLangReflectAccess(LangReflectAccess access)
    
public  voidsetMethodAccessor(Method m, MethodAccessor accessor)
    



Method Detail
copyConstructor
public Constructor copyConstructor(Constructor arg)(Code)
Makes a copy of the passed constructor. The returned constructor is a "child" of the passed one; see the comments in Constructor.java for details.



copyField
public Field copyField(Field arg)(Code)
Makes a copy of the passed field. The returned field is a "child" of the passed one; see the comments in Field.java for details.



copyMethod
public Method copyMethod(Method arg)(Code)
Makes a copy of the passed method. The returned method is a "child" of the passed one; see the comments in Method.java for details.



getConstructorAccessor
public ConstructorAccessor getConstructorAccessor(Constructor c)(Code)
Gets the ConstructorAccessor object for a java.lang.reflect.Constructor



getMethodAccessor
public MethodAccessor getMethodAccessor(Method m)(Code)
Gets the MethodAccessor object for a java.lang.reflect.Method



getReflectionFactory
public static ReflectionFactory getReflectionFactory()(Code)
Provides the caller with the capability to instantiate reflective objects.

First, if there is a security manager, its checkPermission method is called with a java.lang.RuntimePermission with target "reflectionFactoryAccess". This may result in a security exception.

The returned ReflectionFactory object should be carefully guarded by the caller, since it can be used to read and write private data and invoke private methods, as well as to load unverified bytecodes. It must never be passed to untrusted code.
exception:
  SecurityException - if a security manager exists and itscheckPermission method doesn't allowaccess to the RuntimePermission "reflectionFactoryAccess".




inflationThreshold
static int inflationThreshold()(Code)



newConstructor
public Constructor newConstructor(Class declaringClass, Class[] parameterTypes, Class[] checkedExceptions, int modifiers, int slot, String signature, byte[] annotations, byte[] parameterAnnotations)(Code)
Creates a new java.lang.reflect.Constructor. Access checks as per java.lang.reflect.AccessibleObject are not overridden.



newConstructorAccessor
public ConstructorAccessor newConstructorAccessor(Constructor c)(Code)



newConstructorForSerialization
public Constructor newConstructorForSerialization(Class classToInstantiate, Constructor constructorToCall)(Code)



newField
public Field newField(Class declaringClass, String name, Class type, int modifiers, int slot, String signature, byte[] annotations)(Code)
Creates a new java.lang.reflect.Field. Access checks as per java.lang.reflect.AccessibleObject are not overridden.



newFieldAccessor
public FieldAccessor newFieldAccessor(Field field, boolean override)(Code)
Note: this routine can cause the declaring class for the field be initialized and therefore must not be called until the first get/set of this field.
Parameters:
  field - the field
Parameters:
  override - true if caller has overridden aaccessibility



newMethod
public Method newMethod(Class declaringClass, String name, Class[] parameterTypes, Class returnType, Class[] checkedExceptions, int modifiers, int slot, String signature, byte[] annotations, byte[] parameterAnnotations, byte[] annotationDefault)(Code)
Creates a new java.lang.reflect.Method. Access checks as per java.lang.reflect.AccessibleObject are not overridden.



newMethodAccessor
public MethodAccessor newMethodAccessor(Method method)(Code)



setConstructorAccessor
public void setConstructorAccessor(Constructor c, ConstructorAccessor accessor)(Code)
Sets the ConstructorAccessor object for a java.lang.reflect.Constructor



setLangReflectAccess
public void setLangReflectAccess(LangReflectAccess access)(Code)
Called only by java.lang.reflect.Modifier's static initializer



setMethodAccessor
public void setMethodAccessor(Method m, MethodAccessor accessor)(Code)
Sets the MethodAccessor object for a java.lang.reflect.Method



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.