Java Doc for ContextMethodHelper.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » insync » live » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.insync.live 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.insync.live.ContextMethodHelper

ContextMethodHelper
public class ContextMethodHelper (Code)
This class provides the implementation for Design time ContextMethod APIs
author:
   jdeva


Field Summary
 LiveUnitlu
    

Constructor Summary
public  ContextMethodHelper(LiveUnit lu)
    

Method Summary
public  booleancreateContextMethod(ContextMethod method)
    

Creates a new public method in the source code for this DesignContext.

public  ContextMethodgetContextMethod(Method m)
     Returns a ContextMethod object describing the public method with the specified name and parameter types.
public  ContextMethodgetContextMethod(String methodName)
     Returns a ContextMethod object describing the public method with the specified name and no arguments.
public  ContextMethodgetContextMethod(String methodName, Class[] parameterTypes)
     Returns a ContextMethod object describing the public method with the specified name which doesn't take anyparameter types.
public  ContextMethod[]getContextMethods()
     Returns a set of ContextMethod objects describing the public methods declared on this DesignContext (source file).
public  booleanremoveContextMethod(ContextMethod method)
    

Removes an existing method from the source code for this DesignContext.

public  ContextMethodupdateContextMethod(ContextMethod method)
    

Updates an existing public method in the source code for this DesignContext.


Field Detail
lu
LiveUnit lu(Code)




Constructor Detail
ContextMethodHelper
public ContextMethodHelper(LiveUnit lu)(Code)




Method Detail
createContextMethod
public boolean createContextMethod(ContextMethod method) throws IllegalArgumentException(Code)

Creates a new public method in the source code for this DesignContext. The passed ContextMethod must specify at least the designContext and methodName, and must not describe a method that already exists in the DesignContext source. To update an existing method, use the updateContextMethod() method. These methods are separated to help prevent accidental method overwriting. The following table details how the specified ContextMethod is used for this method:

designContext REQUIRED. Must match the DesignContext that is being called. This is essentially a safety precaution to help prevent accidental method overwriting.
methodName REQUIRED. Defines the method name.
parameterTypes Defines the parameter types. If null or an empty array is specified, the created method will have no arguments.
parameterNames Defines the parameter names. If null or an empty array is specified (or an array shorter than the parameterTypes array), default argument names will be used.
returnType Defines the return type. If null is specified, the created method will have a void return type.
throwsTypes Defines the throws clause types. If null is specified, the created method will have no throws clause.
bodySource Defines the method body Java source code. If null is specified, the method will have an empty body. If the value is non-null, this must represent valid (compilable) Java source code.
commentText Defines the comment text above the newly created method. If null is specified, no comment text will be included.


Parameters:
  method - A ContextMethod object representing the desired public method. true if the method was created successfully, or false ifit was not.
throws:
  IllegalArgumentException - If there was a syntax error in any of the ContextMethodsettings, or if the ContextMethod represents a method that already exists on thisDesignContext (updateContextMethod() must be used in this case to avoidaccidental method overwriting)



getContextMethod
public ContextMethod getContextMethod(Method m)(Code)
Returns a ContextMethod object describing the public method with the specified name and parameter types. Returns null if no public method exists on this DesignContext with the specified name and parameter types.
Parameters:
  methodName - The method name of the desired context method
Parameters:
  parameterTypes - The parameter types of the desired context method A ContextMethod object describing the requested method, or null if nomethod exists with the specified name and parameter types



getContextMethod
public ContextMethod getContextMethod(String methodName)(Code)
Returns a ContextMethod object describing the public method with the specified name and no arguments. Returns null if no public method exists on this DesignContext with the specified name and no arguments.
Parameters:
  methodName - The method name of the desired context method A ContextMethod object describing the requested method, or null if nomethod exists with the specified name and no arguments



getContextMethod
public ContextMethod getContextMethod(String methodName, Class[] parameterTypes)(Code)
Returns a ContextMethod object describing the public method with the specified name which doesn't take anyparameter types. Returns null if no public method exists on this DesignContext with the specified name and parameter types.
Parameters:
  methodName - The method name of the desired context method
Parameters:
  parameterTypes - The parameter types of the desired context method A ContextMethod object describing the requested method, or null if nomethod exists with the specified name and parameter types



getContextMethods
public ContextMethod[] getContextMethods()(Code)
Returns a set of ContextMethod objects describing the public methods declared on this DesignContext (source file). An array of ContextMethod objects, describing the public methods declared onthis DesignContext (source file)



removeContextMethod
public boolean removeContextMethod(ContextMethod method)(Code)

Removes an existing method from the source code for this DesignContext. The passed ContextMethod will be used to locate the desired method to remove using the designContext, methodName, and parameterTypes. No other portions of the ContextMethod are used. The following table details how the specified ContextMethod is used for this method:

designContext REQUIRED. Must match the DesignContext that is being called. This is essentially a safety precaution to help prevent accidental method removal.
methodName REQUIRED. Specifies the desired method name.
parameterTypes REQUIRED. Specifies the desired method's parameter types (if it has any). If null or an empty array is specified, the desired method is assumed to have zero arguments.
parameterNames Ignored.
returnType Ignored.
throwsTypes Ignored.
bodySource Ignored.
commentText Ignored.


Parameters:
  method - A ContextMethod object defining the method to be removed true if the method was successfully removed
exception:
  IllegalArgumentException - if the specified ContextMethod does not exist or is notpublic on this DesignContext



updateContextMethod
public ContextMethod updateContextMethod(ContextMethod method) throws IllegalArgumentException(Code)

Updates an existing public method in the source code for this DesignContext. The passed ContextMethod will be used to locate the desired public method to update using the designContext, methodName, and parameterTypes. This method may only be used to update the parameterNames, returnType, throwsTypes, bodySource, or commentText. Any other changes actually constitute the creation of a new method, as they alter the method signature. To create a new method, the createContextMethod() method should be used. These operations are separated to help prevent accidental method overwriting. The following table details how the specified ContextMethod is used for this method:

designContext REQUIRED. Must match the DesignContext that is being called. This is essentially a safety precaution to help prevent accidental method overwriting.
methodName REQUIRED. Specifies the desired method name.
parameterTypes REQUIRED. Specifies the desired method's parameter types (if it has any). If null or an empty array is specified, the desired method is assumed to have zero arguments.
parameterNames Defines the parameter names. If null or an empty array is specified (or an array shorter than the parameterTypes array), default argument names will be used.
returnType Defines the method's return type. If null is specified, the method is assumed to have a void return type.
throwsTypes Defines the throws clause types. If null is specified, the resulting method will have no throws clause.
bodySource Defines the method body Java source code. If null is specified, the resulting method body will be empty. If the value is non-null, this must represent valid (compilable) Java source code. Note that a method with a non-void return type must return a value.
commentText Defines the comment text above the newly created method. If null is specified, no comment text will be included.


Parameters:
  method - The desired ContextMethod representing the method to be updated The resulting ContextMethod object (including any updates from the process)
throws:
  IllegalArgumentException - If there was a syntax error in any of the ContextMethodsettings, or if the ContextMethod does not exist in this DesignContext.



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.