Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Java Tutorial
Reflection 176 codes
Home
Java Tutorial
Reflection
1 A phantom reference is used to determine when an object is just about to be reclaimed
2 A program that displays a class synopsis for the named class
3 A soft reference holds onto its referent until memory becomes low
4 A tree structure that maps inheritance hierarchies of classes
5 A weak reference is used to determine when an object is no longer being referenced
6 AccessController doPrivileged(new PrivilegedAction() )
7 Although the type of o2 is an interface, getSuperclass() returns the objects superclass
8 Analyze ClassLoader hierarchy for any given object or class loader
9 Array reflection and two dimensional array
10 BufferedReader reflection
11 Call a class method with 2 arguments
12 Call a member function to get the value
13 Call all possible exceptions during method invocation with reflection
14 Call Private constructor
15 Catch InvocationTargetException
16 Checking whether String is an interface or class
17 Checks whether the specified class contains a field matching the specified name
18 Checks whether the specified class contains a method matching the specified name
19 Class comparator
20 Class name for double and float array
21 Contains Same Method Signature
22 Context ClassLoader
23 Create an object from a string
24 Create array with Array newInstance
25 Create integer array with Array newInstance
26 Create new instance
27 Create new instance from Constructor
28 Creating a Proxy Object
29 Creating an Object Using a Constructor Object
30 Demonstrate Package
31 Demonstrates Dynamic class type checking
32 Demonstrates fetching nested class info from a Class object
33 Demonstrates getting immediate superclass info
34 Demonstrates how to get declaration information on a Class
35 Demonstrates how to get simple method information
36 Demonstrates how to get specific method information
37 Demonstrates how to set public field objects
38 Demonstrates the use of getDeclaringClass()
39 Demonstrates the use of instance comparisons
40 Demonstrates the use of the Array class
41 Demonstrates usage of various class information methods
42 Demonstrates use of Constructor objects
43 Demonstration of how to obtain instances of java lang Class
44 Design your own class loader
45 Detect if a package is available
46 Determine whether the supplied string represents a well-formed fully-qualified Java classname
47 Determining from Where a Class Was Loaded
48 Determining If an Object Is an Array
49 Dynamically Reloading a Modified Class
50 Extends URLClassLoader
51 Find method
52 Find the Package of an Object
53 Generic class Reflection
54 Get a compatible constructor for the given value type
55 Get a variable value from the variable name
56 Get all constructors or by parameters
57 Get all declared fields from a class
58 Get all interface and object classes that are generalizations of the provided class
59 Get all methods including the inherited method Using the getMethods(), we can only access public methods
60 Get all object accessible public fields
61 Get annotation by Annotation class
62 Get annotation by type
63 Get Canonical Name for a class
64 Get class from an object
65 Get class name for various object
66 Get constructor by parameter type
67 Get Declared Method by name and parameter type
68 Get full class name
69 Get full package name
70 Get method from a class by name
71 Get method my parameters
72 Get non Package Qualified Name
73 Get package name of a class
74 Get Package Names From Dir
75 Get super class and all its declared methods
76 Get super class of an object
77 Get Super Interfaces
78 Get the class By way of a string
79 Get the class By way of an object
80 Get the class By way of class
81 Get the class name in a static method
82 Get the class name with or without the package
83 Get the current method name
84 Get the current method name With JDK1 5
85 Get the fully-qualified name of a class
86 Get the fully-qualified name of a inner class
87 Get the name of a class
88 Get the name of a primitive type
89 Get the name of an array
90 Get the name of void
91 Get the package name of the specified class
92 Get the path from where a class is loaded
93 Get the short name of the specified class by striping off the package name
94 Get the unqualified name of a class
95 GetPackage() returns null for a class in the unnamed package
96 GetPackage() returns null for a primitive type or array
97 Gets a method and forces it to be accessible, even if it is not
98 Getting a Constructor of a Class Object
99 Getting and Setting the Value of a Field (assumes that the field has the type int)
100 Getting the Component Type of an Array Object
101 Getting the Field Objects of a Class Object
102 Getting the Length and Dimensions of an Array Object
103 Getting the Methods of a Class Object
104 Getting the Name of a Member Object
105 Getting the Superclass of an Object
106 Has Declared Constructor
107 How to use reflection to print the names and values of all nonstatic fields of an object
108 If a class object is an interface or a class
109 Instantiate unknown class at runtime and call the objects methods
110 Invoke a constructor which throws Exception
111 Invoke a method with parameter
112 Invoke method with wrong parameters
113 Invoke methods of an object using reflection
114 Is field an array
115 Is Inheritable
116 Is the Same Signature
117 Is Type Compatible
118 List methods of a class using Reflection
119 Listing the Interfaces That a Class Implements
120 Listing the Interfaces That an Interface Extends
121 Listing the Modifiers of a Class Object
122 Listing the Modifiers of a Member Object
123 Load Class
124 Load class with Class forName
125 Load classes
126 Load the class source location from Class getResource()
127 Loading a Class That Is Not on the Classpath
128 Make AccessibleObject Accessible
129 Make field accessible, explicitly setting it accessible
130 Method Inspector
131 Modifier PUBLIC Modifier PRIVATE Modifier PROTECTED
132 Obtain from where a Class is loaded
133 Overriding Default Access
134 Passing a parameter to the constructor and calling a method dynamically
135 Prints out the declared methods on java lang Number
136 Prints out the declared methods on java lang Object
137 Recursively get all fields for a hierarchical class tree
138 Reflect All
139 Reflection, Introspection, and Naming
140 Retrieving a Predefined Color by Name
141 Return a list of all fields (whatever access status, and on whatever superclass they were defined) that can be found on this cl
142 Return Retrurns the Type of the given Field or Method
143 Return Returns true if type is implementing Map
144 Return true if the integer argument includes the abstract modifier, false otherwise
145 Return true if the integer argument includes the final modifier, false otherwise
146 Return true if the integer argument includes the private modifier, false otherwise
147 Return true if the integer argument includes the protected modifier,false otherwise
148 Return true if the integer argument includes the public modifier, false otherwise
149 Return true if the integer argument includes the static modifier, false otherwise
150 Returns a reference to a file with the specified name that is located somewhere on the classpath
151 Returns method with the specified name
152 Returns the length of the specified array, can deal with Object arrays and with primitive arrays
153 Returns the name of a class without the package name
154 Returns the package portion of the specified class
155 Returns true if a class implements Serializable and false otherwise
156 Runs a jar application from any url
157 Set Accessibility
158 Show all annotations for a class and a method
159 Show public methods
160 Sorts methods according to their name, number of parameters, and parameter types
161 Superclass of Object is null
162 System class reflection
163 Testing PhantomReference
164 Testing SoftReference
165 Testing WeakReference
166 The interfaces for a primitive type is an empty array
167 The superclass of interfaces is always null
168 The superclass of primitive types is always null
169 Unqualified names
170 URL class loader
171 Use Array setInt to fill an array
172 Use Array setShort and Array setLong
173 Use Class forName to load a class
174 Use reflection to display the annotation associated with a method
175 Using the forName() method
176 Whether given field is a public static final constant