Java Doc for Substitution.java in  » Code-Analyzer » Spoon » spoon » template » 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 » Code Analyzer » Spoon » spoon.template 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   spoon.template.Substitution

Substitution
abstract public class Substitution (Code)
This class defines the substitution API for templates (see Template ).




Method Summary
public static  voidinsertAll(CtType targetType, Template template)
     Inserts all the methods, fields, constructors, initialization blocks (if target is a class), inner types, and super interfaces (except Template ) from a given template by substituting all the template parameters by their values.
public static  voidinsertAllConstructors(CtType targetType, Template template)
     Inserts all constructors and initialization blocks from a given template by substituting all the template parameters by their values.
public static  voidinsertAllFields(CtType targetType, Template template)
     Inserts all the fields from a given template by substituting all the template parameters by their values.
public static  voidinsertAllMethods(CtType targetType, Template template)
     Inserts all the methods from a given template by substituting all the template parameters by their values.
public static  voidinsertAllSuperInterfaces(CtType targetType, Template template)
     Inserts all the super interfaces (except Template ) from a given template by substituting all the template parameters by their values.
public static  CtConstructor<T>insertConstructor(CtClass<T> targetClass, Template template, CtMethod sourceMethod)
     Generates a constructor from a template method by substituting all the template parameters by their values.
public static  CtConstructor<T>insertConstructor(CtClass<T> targetClass, Template template, CtConstructor sourceConstructor)
     Generates a constructor from a template constructor by substituting all the template parameters by their values.
public static  CtField<T>insertField(CtType targetType, Template template, CtField<T> sourceField)
     Generates a field (and its initialization expression) from a template field by substituting all the template parameters by their values.
public static  CtMethod<T>insertMethod(CtType targetType, Template template, CtMethod<T> sourceMethod)
     Generates a method from a template method by substituting all the template parameters by their values.
public static  voidredirectTypeReferences(CtElement element, CtTypeReference source, CtTypeReference target)
     A helper method that recursively redirects all the type references from a source type to a target type in the given element.
public static  Esubstitute(CtSimpleType targetType, Template template, E code)
     Substitutes all the template parameters in a random piece of code.
public static  Tsubstitute(Template template, T templateType)
     Substitutes all the template parameters in a given template type and returns the resulting type.
public static  CtExpressionsubstituteFieldDefaultExpression(CtSimpleType targetType, Template template, String fieldName)
     Gets a default expression from a template field with all the template parameters substituted.
public static  CtBlocksubstituteMethodBody(CtClass targetClass, Template template, String executableName, CtTypeReference... parameterTypes)
     Gets a body from a template executable with all the template parameters substituted.



Method Detail
insertAll
public static void insertAll(CtType targetType, Template template)(Code)
Inserts all the methods, fields, constructors, initialization blocks (if target is a class), inner types, and super interfaces (except Template ) from a given template by substituting all the template parameters by their values. Members annotated with spoon.template.Local or Parameter are not inserted.
Parameters:
  targetType - the target type
Parameters:
  template - the source template



insertAllConstructors
public static void insertAllConstructors(CtType targetType, Template template)(Code)
Inserts all constructors and initialization blocks from a given template by substituting all the template parameters by their values. Members annotated with spoon.template.Local or Parameter are not inserted.
Parameters:
  targetType - the target type
Parameters:
  template - the source template



insertAllFields
public static void insertAllFields(CtType targetType, Template template)(Code)
Inserts all the fields from a given template by substituting all the template parameters by their values. Members annotated with spoon.template.Local or Parameter are not inserted.
Parameters:
  targetType - the target type
Parameters:
  template - the source template



insertAllMethods
public static void insertAllMethods(CtType targetType, Template template)(Code)
Inserts all the methods from a given template by substituting all the template parameters by their values. Members annotated with spoon.template.Local or Parameter are not inserted.
Parameters:
  targetType - the target type
Parameters:
  template - the source template



insertAllSuperInterfaces
public static void insertAllSuperInterfaces(CtType targetType, Template template)(Code)
Inserts all the super interfaces (except Template ) from a given template by substituting all the template parameters by their values.
Parameters:
  targetType - the target type
Parameters:
  template - the source template



insertConstructor
public static CtConstructor<T> insertConstructor(CtClass<T> targetClass, Template template, CtMethod sourceMethod)(Code)
Generates a constructor from a template method by substituting all the template parameters by their values.
Parameters:
  targetClass - the target class where to insert the generated constructor
Parameters:
  template - the template instance that holds the source template methodand that defines the parameter values
Parameters:
  sourceMethod - the source template method the generated method



insertConstructor
public static CtConstructor<T> insertConstructor(CtClass<T> targetClass, Template template, CtConstructor sourceConstructor)(Code)
Generates a constructor from a template constructor by substituting all the template parameters by their values.
Parameters:
  targetClass - the target class where to insert the generated constructor
Parameters:
  template - the template instance that holds the source templateconstructor and that defines the parameter values
Parameters:
  sourceConstructor - the source template constructor the generated constructor



insertField
public static CtField<T> insertField(CtType targetType, Template template, CtField<T> sourceField)(Code)
Generates a field (and its initialization expression) from a template field by substituting all the template parameters by their values. <
Parameters:
  T - >the type of the field
Parameters:
  targetType - the target type where the field is inserted
Parameters:
  template - the template that defines the source template field
Parameters:
  sourceField - the source template field the inserted field



insertMethod
public static CtMethod<T> insertMethod(CtType targetType, Template template, CtMethod<T> sourceMethod)(Code)
Generates a method from a template method by substituting all the template parameters by their values.
Parameters:
  targetType - the target type where to insert the generated method
Parameters:
  template - the template instance that holds the source template methodand that defines the parameter values
Parameters:
  sourceMethod - the source template method the generated method



redirectTypeReferences
public static void redirectTypeReferences(CtElement element, CtTypeReference source, CtTypeReference target)(Code)
A helper method that recursively redirects all the type references from a source type to a target type in the given element.



substitute
public static E substitute(CtSimpleType targetType, Template template, E code)(Code)
Substitutes all the template parameters in a random piece of code.
Parameters:
  targetType - the target type
Parameters:
  template - the template instance
Parameters:
  code - the code the code where all the template parameters has be substituted bytheir values



substitute
public static T substitute(Template template, T templateType)(Code)
Substitutes all the template parameters in a given template type and returns the resulting type.
Parameters:
  template - the template instance (holds the parameter values)
Parameters:
  templateType - the template type a copy of the template type where all the parameters has beensubstituted



substituteFieldDefaultExpression
public static CtExpression substituteFieldDefaultExpression(CtSimpleType targetType, Template template, String fieldName)(Code)
Gets a default expression from a template field with all the template parameters substituted.
Parameters:
  targetType - the target type
Parameters:
  template - the template that holds the field
Parameters:
  fieldName - the template source field the expression of the template source field with all the templateparameters substituted



substituteMethodBody
public static CtBlock substituteMethodBody(CtClass targetClass, Template template, String executableName, CtTypeReference... parameterTypes)(Code)
Gets a body from a template executable with all the template parameters substituted.
Parameters:
  targetClass - the target class
Parameters:
  template - the template that holds the executable
Parameters:
  executableName - the source executable template
Parameters:
  parameterTypes - the parameter types of the source executable the body expression of the source executable template with allthe template parameters substituted



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.