Java Doc for ClassInspector.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » services » loader » 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 » Database DBMS » db derby 10.2 » org.apache.derby.iapi.services.loader 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.services.loader.ClassInspector

ClassInspector
final public class ClassInspector (Code)
Methods to find out relationships between classes and methods within a class. All class names within this interface are treated as java language class names, e.g. int, COM.foo.Myclass, int[], java.lang.Object[]. That is java internal class names as defined in the class file format are not understood.



Constructor Summary
public  ClassInspector(ClassFactory cf)
     DO NOT USE! use the method in ClassFactory.

Method Summary
public  booleanaccessible(String className)
    
public  booleanassignableTo(String fromClassName, String toClassName)
    
protected  booleanclassConvertableFromTo(Class fromClass, Class toClass, boolean mixTypes)
     Can we convert a fromClass to toClass.
public static  booleanclassIsLoadable(String className)
     Determine whether or not the received class can be loaded.
public  MemberfindPublicConstructor(String receiverType, String[] parmTypes, String[] primParmTypes, boolean[] isParam)
     Find a public constructor that implements a given signature. The signature is given using the full Java class names of the types.
A untyped null paramter is indicated by passing in an empty string ("") as its class name.
public  MemberfindPublicField(String receiverType, String fieldName, boolean staticField)
     Find a public field for a class. This follows the sematics of the java compiler for locating a field. This means if a field fieldName exists in the class with package, private or protected then an error is raised.
public  MemberfindPublicMethod(String receiverType, String methodName, String[] parmTypes, String[] primParmTypes, boolean[] isParam, boolean staticMethod, boolean repeatLastParameter)
     Find a public method that implements a given signature. The signature is given using the full Java class names of the types.
A untyped null paramter is indicated by passing in an empty string ("") as its class name.
If receiverType respresents an interface then the methods of java.lang.Object arer included in the candidate list.
If the caller is simply checking to see that a public method with the specified name exists, regardless of the signature, exists, then the caller should pass in a null for parmTypes.
public  ClassgetClass(String className)
     Get (load) the class for the given class name. This method converts any java language class name into a Class object.
public  StringgetDeclaringClass(Member method)
     Get the declaring class for a method.
public  String[]getParameterTypes(Member method)
     Get the parameter types for a method described by a Member as a String[].
public  StringgetType(Member member)
     Get the Java name of the return type from a Member representing a method or the type of a Member representing a field.
public  booleaninstanceOf(String className, Object obj)
    
public static  booleanprimitiveType(String typeName)
    
public static  StringreadableClassName(Class clazz)
     Translate a JVM-style type descriptor to a Java-language-style type name.


Constructor Detail
ClassInspector
public ClassInspector(ClassFactory cf)(Code)
DO NOT USE! use the method in ClassFactory.




Method Detail
accessible
public boolean accessible(String className) throws ClassNotFoundException(Code)
Does the named class exist, and is it accessible?
Parameters:
  className - The name of the class to test for existence true if the class exists and is accessible, false if not



assignableTo
public boolean assignableTo(String fromClassName, String toClassName)(Code)
Is one named class assignable to another named class or interface?
Parameters:
  fromClassName - The name of the class to be assigned
Parameters:
  toClassName - The name of the class to be assigned to true if an object of type fromClass can be assigned to anobject of type toClass, false if not.



classConvertableFromTo
protected boolean classConvertableFromTo(Class fromClass, Class toClass, boolean mixTypes)(Code)
Can we convert a fromClass to toClass. "mixTypes" is a flag to show if object/primitive type conversion is possible; this is used for comparing two candidate methods in the second pass of the two pass method resolution.
Parameters:
  fromClass - from class
Parameters:
  toClass - to class
Parameters:
  mixTypes - mixing object/primitive types for comparison



classIsLoadable
public static boolean classIsLoadable(String className)(Code)
Determine whether or not the received class can be loaded.
Parameters:
  className - The name of the class in question True if className can be loaded, false otherwise



findPublicConstructor
public Member findPublicConstructor(String receiverType, String[] parmTypes, String[] primParmTypes, boolean[] isParam) throws ClassNotFoundException, StandardException(Code)
Find a public constructor that implements a given signature. The signature is given using the full Java class names of the types.
A untyped null paramter is indicated by passing in an empty string ("") as its class name.
Parameters:
  receiverType - The class name of the receiver
Parameters:
  parmTypes - An array of class names representing theparameter types. Pass a zero-element array ifthere are no parameters.
Parameters:
  primParmTypes - This is used in the second pass of the two-passmethod resolution algorithm. Use primitive typeif it has one, otherwise use same object type
Parameters:
  isParam - Array of booleans telling whether parameter is a ?. A Member representing the matching constructor. Returns nullif no such constructor.
exception:
  ClassNotFoundException - One or more of the classes doesnot exist.
exception:
  StandardException - Thrown on ambiguous constructor invocation.
See Also:   Member
See Also:   Modifier



findPublicField
public Member findPublicField(String receiverType, String fieldName, boolean staticField) throws StandardException(Code)
Find a public field for a class. This follows the sematics of the java compiler for locating a field. This means if a field fieldName exists in the class with package, private or protected then an error is raised. Even if the field hides a field fieldName in a super-class/super--interface. See the JVM spec on fields.
Parameters:
  receiverType - The class name of the receiver
Parameters:
  fieldName - The name of the field
Parameters:
  staticField - Find a static field A Member representing the matching field.
exception:
  StandardException - Class or field does not exist or is not public or a security exception.
See Also:   Member
See Also:   Modifier



findPublicMethod
public Member findPublicMethod(String receiverType, String methodName, String[] parmTypes, String[] primParmTypes, boolean[] isParam, boolean staticMethod, boolean repeatLastParameter) throws ClassNotFoundException, StandardException(Code)
Find a public method that implements a given signature. The signature is given using the full Java class names of the types.
A untyped null paramter is indicated by passing in an empty string ("") as its class name.
If receiverType respresents an interface then the methods of java.lang.Object arer included in the candidate list.
If the caller is simply checking to see that a public method with the specified name exists, regardless of the signature, exists, then the caller should pass in a null for parmTypes. (This is useful for checking the validity of a method alias when creating one.)
We use a two-pass algorithm to resolve methods. In the first pass, we use all "object" types to try to match a method. If this fails, in the second pass, an array of "primitive" types (if the parameter has one, otherwise the same object type is used) is passed in, as well as the "object" type array. For each parameter of a method, we try to match it against either the "object" type, or the "primitive" type. Of all the qualified candidate methods found, we choose the closest one to the input parameter types. This involves comparing methods whose parameters are mixed "object" and "primitive" types in the second pass. This is eventually handled in classConvertableFromTo.
Parameters:
  receiverType - The class name of the receiver
Parameters:
  methodName - The name of the method
Parameters:
  parmTypes - An array of class names representing theparameter types. Pass a zero-element array ifthere are no parameters. Pass a null if it isokay to match any signature.
Parameters:
  primParmTypes - This is used in the second pass of the two-passmethod resolution algorithm. Use primitive typeif it has one, otherwise use same object type
Parameters:
  isParam - Array of booleans telling whether parameter is a ?.
Parameters:
  staticMethod - Find a static method.
Parameters:
  repeatLastParameter - If true the last parameter may be repeated any number of times (total count must be greater than one).If false the laste parameter is matched as usual. This also requires an exact match on the last parameter type. A Member representing the matching method. Returns nullif no such method.
exception:
  ClassNotFoundException - One or more of the classes doesnot exist.
exception:
  StandardException - Thrown on ambiguous method invocation.
See Also:   Member
See Also:   Modifier



getClass
public Class getClass(String className) throws ClassNotFoundException(Code)
Get (load) the class for the given class name. This method converts any java language class name into a Class object. This includes cases like String[] and primitive types. This will attempt to load the class from the application set.
exception:
  ClassNotFoundException - Class cannot be found, ora SecurityException or LinkageException was thrown loading the class.



getDeclaringClass
public String getDeclaringClass(Member method)(Code)
Get the declaring class for a method.
Parameters:
  method - A Member describing a method A String with the declaring class
See Also:   Member.getDeclaringClass



getParameterTypes
public String[] getParameterTypes(Member method)(Code)
Get the parameter types for a method described by a Member as a String[].
Parameters:
  method - A Member describing a method A String[] describing the parameters of the method



getType
public String getType(Member member)(Code)
Get the Java name of the return type from a Member representing a method or the type of a Member representing a field.
Parameters:
  member - A Member representing the method forwhich we want the return type. A Java-language-style string describing the return type ofthe method (for example, it returns "int" instead of "I".



instanceOf
public boolean instanceOf(String className, Object obj) throws ClassNotFoundException(Code)
Is the given object an instance of the named class?
Parameters:
  className - The name of the class
Parameters:
  obj - The object to test to see if it's an instanceof the named class true if obj is an instanceof className, false if not



primitiveType
public static boolean primitiveType(String typeName)(Code)
Determine whether a type is a Java primitive, like int or boolean
Parameters:
  typeName - The name of the Java type true if it's a primitive type



readableClassName
public static String readableClassName(Class clazz)(Code)
Translate a JVM-style type descriptor to a Java-language-style type name.
Parameters:
  clazz - The String that contains the JVM type name The Java-language-style type name



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.