Java Doc for MetaClassImpl.java in  » Scripting » groovy-1.0 » groovy » lang » 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 » Scripting » groovy 1.0 » groovy.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   groovy.lang.MetaClass
      groovy.lang.MetaClassImpl

All known Subclasses:   groovy.lang.ProxyMetaClass,
MetaClassImpl
public class MetaClassImpl extends MetaClass (Code)
Allows methods to be dynamically added to existing classes at runtime
author:
   James Strachan
author:
   Guillaume Laforge
author:
   Jochen Theodorou
version:
   $Revision: 4669 $
See Also:   groovy.lang.MetaClass


Field Summary
protected  MetaClassRegistryregistry
    

Constructor Summary
public  MetaClassImpl(MetaClassRegistry registry, Class theClass)
    

Method Summary
protected  voidaddMetaMethod(MetaMethod method)
     adds a MetaMethod to this class.
public  voidaddNewInstanceMethod(Method method)
    
public  voidaddNewStaticMethod(Method method)
    
protected  voidcacheInstanceMethod(MethodKey key, MetaMethod method)
    
protected  voidcacheStaticMethod(MethodKey key, MetaMethod method)
    
protected  voidcheckInitalised()
     checks if the initialisation of the class id complete. This method should be called as a form of assert, it is no way to test if there is still initialisation work to be done.
protected  voidclearInvocationCaches()
     remove all method call cache entries.
public  ObjectgetAttribute(Class sender, Object object, String attribute, boolean useSuper, boolean fromInsideClass)
    
public  ObjectgetAttribute(Object object, String attribute)
    
public  ClassNodegetClassNode()
    
public  ListgetMetaMethods()
    
public  MetaMethodgetMethodWithCaching(Class sender, String methodName, Class[] arguments, boolean isCallToSuper)
    
public  MetaMethodgetMethodWithoutCaching(Class sender, String methodName, Class[] arguments, boolean isCallToSuper)
    
public  ListgetMethods()
    
public  ListgetProperties()
    
public  ObjectgetProperty(Class sender, Object object, String name, boolean useSuper, boolean fromInsideClass)
    
public  ObjectgetProperty(Object object, String property)
    
public synchronized  voidinitialize()
    
public  ObjectinvokeConstructor(Object[] arguments)
    
public  ObjectinvokeMethod(Object object, String methodName, Object[] originalArguments)
     Invokes the given method on the object.
public  ObjectinvokeMethod(Class sender, Object object, String methodName, Object[] originalArguments, boolean isCallToSuper, boolean fromInsideClass)
     Invokes the given method on the object.
public  ObjectinvokeStaticMethod(Object object, String methodName, Object[] arguments)
    
protected  booleanisInitialized()
    
public  MetaMethodpickMethod(String methodName, Class[] arguments)
    
public  ConstructorretrieveConstructor(Class[] arguments)
    
protected  MetaMethodretrieveMethod(String methodName, Class[] arguments)
    
public  MetaMethodretrieveStaticMethod(String methodName, Class[] arguments)
    
public  intselectConstructorAndTransformArguments(int numberOfCosntructors, Object[] arguments)
    
public  voidsetAttribute(Class sender, Object object, String attribute, Object newValue, boolean useSuper, boolean fromInsideClass)
    
public  voidsetAttribute(Object object, String attribute, Object newValue)
    
public  voidsetProperties(Object bean, Map map)
    
public  voidsetProperty(Class sender, Object object, String name, Object newValue, boolean useSuper, boolean fromInsideClass)
    
public  voidsetProperty(Object object, String property, Object newValue)
    
public  StringtoString()
    

Field Detail
registry
protected MetaClassRegistry registry(Code)




Constructor Detail
MetaClassImpl
public MetaClassImpl(MetaClassRegistry registry, Class theClass)(Code)




Method Detail
addMetaMethod
protected void addMetaMethod(MetaMethod method)(Code)
adds a MetaMethod to this class. WARNING: this method will not do the neccessary steps for multimethod logic and using this method doesn't mean, that a method added here is replacing another method from a parent class completely. These steps are usually done by initalize, which means if you need these steps, you have to add the method before running initialize the first time.
See Also:   MetaClassImpl.initialize()
See Also:   
Parameters:
  method - the MetaMethod



addNewInstanceMethod
public void addNewInstanceMethod(Method method)(Code)



addNewStaticMethod
public void addNewStaticMethod(Method method)(Code)



cacheInstanceMethod
protected void cacheInstanceMethod(MethodKey key, MetaMethod method)(Code)



cacheStaticMethod
protected void cacheStaticMethod(MethodKey key, MetaMethod method)(Code)



checkInitalised
protected void checkInitalised()(Code)
checks if the initialisation of the class id complete. This method should be called as a form of assert, it is no way to test if there is still initialisation work to be done. Such logic must be implemented in a different way.
throws:
  IllegalStateException - if the initialisation is incomplete yet



clearInvocationCaches
protected void clearInvocationCaches()(Code)
remove all method call cache entries. This should be done if a method is added during runtime, but not by using a category.



getAttribute
public Object getAttribute(Class sender, Object object, String attribute, boolean useSuper, boolean fromInsideClass)(Code)
Looks up the given attribute (field) on the given object



getAttribute
public Object getAttribute(Object object, String attribute)(Code)



getClassNode
public ClassNode getClassNode()(Code)



getMetaMethods
public List getMetaMethods()(Code)



getMethodWithCaching
public MetaMethod getMethodWithCaching(Class sender, String methodName, Class[] arguments, boolean isCallToSuper)(Code)



getMethodWithoutCaching
public MetaMethod getMethodWithoutCaching(Class sender, String methodName, Class[] arguments, boolean isCallToSuper)(Code)



getMethods
public List getMethods()(Code)



getProperties
public List getProperties()(Code)
Get all the properties defined for this type a list of MetaProperty objects



getProperty
public Object getProperty(Class sender, Object object, String name, boolean useSuper, boolean fromInsideClass)(Code)
the given property's value on the object



getProperty
public Object getProperty(Object object, String property)(Code)



initialize
public synchronized void initialize()(Code)



invokeConstructor
public Object invokeConstructor(Object[] arguments)(Code)



invokeMethod
public Object invokeMethod(Object object, String methodName, Object[] originalArguments)(Code)
Invokes the given method on the object.



invokeMethod
public Object invokeMethod(Class sender, Object object, String methodName, Object[] originalArguments, boolean isCallToSuper, boolean fromInsideClass)(Code)
Invokes the given method on the object.



invokeStaticMethod
public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)(Code)



isInitialized
protected boolean isInitialized()(Code)



pickMethod
public MetaMethod pickMethod(String methodName, Class[] arguments)(Code)



retrieveConstructor
public Constructor retrieveConstructor(Class[] arguments)(Code)



retrieveMethod
protected MetaMethod retrieveMethod(String methodName, Class[] arguments)(Code)



retrieveStaticMethod
public MetaMethod retrieveStaticMethod(String methodName, Class[] arguments)(Code)



selectConstructorAndTransformArguments
public int selectConstructorAndTransformArguments(int numberOfCosntructors, Object[] arguments)(Code)



setAttribute
public void setAttribute(Class sender, Object object, String attribute, Object newValue, boolean useSuper, boolean fromInsideClass)(Code)
Sets the given attribute (field) on the given object



setAttribute
public void setAttribute(Object object, String attribute, Object newValue)(Code)



setProperties
public void setProperties(Object bean, Map map)(Code)
Sets a number of bean properties from the given Map where the keys are the String names of properties and the values are the values of the properties to set



setProperty
public void setProperty(Class sender, Object object, String name, Object newValue, boolean useSuper, boolean fromInsideClass)(Code)
Sets the property value on an object



setProperty
public void setProperty(Object object, String property, Object newValue)(Code)



toString
public String toString()(Code)



Fields inherited from groovy.lang.MetaClass
final public static Object NO_METHOD_FOUND(Code)(Java Doc)
final protected static Logger log(Code)(Java Doc)
final protected Class theClass(Code)(Java Doc)
protected static boolean useReflection(Code)(Java Doc)

Methods inherited from groovy.lang.MetaClass
abstract public void addNewInstanceMethod(Method method)(Code)(Java Doc)
abstract public void addNewStaticMethod(Method method)(Code)(Java Doc)
public Object getAttribute(Class sender, Object receiver, String messageName, boolean useSuper)(Code)(Java Doc)
abstract public Object getAttribute(Object object, String attribute)(Code)(Java Doc)
abstract public ClassNode getClassNode()(Code)(Java Doc)
abstract public List getMetaMethods()(Code)(Java Doc)
abstract public List getMethods()(Code)(Java Doc)
abstract public List getProperties()(Code)(Java Doc)
public Object getProperty(Class sender, Object receiver, String messageName, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc)
abstract public Object getProperty(Object object, String property)(Code)(Java Doc)
abstract public void initialize()(Code)(Java Doc)
abstract public Object invokeConstructor(Object[] arguments)(Code)(Java Doc)
public Object invokeConstructorAt(Class at, Object[] arguments)(Code)(Java Doc)
public Object invokeMethod(Object object, String methodName, Object arguments)(Code)(Java Doc)
public Object invokeMethod(Class sender, Object receiver, String methodName, Object[] arguments, boolean isCallToSuper, boolean fromInsideClass)(Code)(Java Doc)
abstract public Object invokeMethod(Object object, String methodName, Object[] arguments)(Code)(Java Doc)
public Object invokeMissingMethod(Object instance, String methodName, Object[] arguments)(Code)(Java Doc)
abstract public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)(Code)(Java Doc)
public boolean isGroovyObject()(Code)(Java Doc)
public static boolean isUseReflection()(Code)(Java Doc)
abstract public MetaMethod pickMethod(String methodName, Class[] arguments)(Code)(Java Doc)
protected MetaMethod retrieveMethod(String methodName, Class[] arguments)(Code)(Java Doc)
public void setAttribute(Class sender, Object receiver, String messageName, Object messageValue, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc)
abstract public void setAttribute(Object object, String attribute, Object newValue)(Code)(Java Doc)
public void setProperty(Class sender, Object receiver, String messageName, Object messageValue, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc)
abstract public void setProperty(Object object, String property, Object newValue)(Code)(Java Doc)
public static void setUseReflection(boolean useReflection)(Code)(Java Doc)

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.