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


java.lang.Object
   spoon.reflect.factory.SubFactory
      spoon.reflect.factory.CodeFactory

CodeFactory
public class CodeFactory extends SubFactory (Code)
This sub-factory contains utility methods to create code elements. To avoid over-using reflection, consider using spoon.template.Template .



Constructor Summary
public  CodeFactory(Factory factory)
     Creates a spoon.reflect.code.CtCodeElement sub-factory.

Method Summary
public  CtBinaryOperator<T>createBinaryOperator(CtExpression left, CtExpression right, BinaryOperatorKind kind)
     Creates a binary operator.
public  CtFieldAccess<Class<T>>createClassAccess(CtTypeReference<T> type)
     Creates a class access expression of the form C.class.
public  CtCodeSnippetExpression<T>createCodeSnippetExpression(String expression)
     Creates a Code Snippet expression. <
Parameters:
  T - > The type of the expression represented by the CodeSnippet
Parameters:
  expression - The string that contains the expression.
public  CtCodeSnippetStatementcreateCodeSnippetStatement(String statement)
     Creates a Code Snippet statement.
Parameters:
  statement - The String containing the statement.
public  CtInvocation<T>createInvocation(CtExpression target, CtExecutableReference<T> executable, CtExpression... arguments)
     Creates an invocation (can be a statement or an expression).
public  CtInvocation<T>createInvocation(CtExpression target, CtExecutableReference<T> executable, List<CtExpression<?>> arguments)
     Creates an invocation (can be a statement or an expression).
public  CtLiteral<T>createLiteral(T value)
     Creates a literal with a given value.
public  CtNewArray<T[]>createLiteralArray(T[] value)
     Creates a one-dimension array that must only contain literals.
public  CtLocalVariable<T>createLocalVariable(CtTypeReference<T> type, String name, CtExpression<T> defaultExpression)
     Creates a local variable declaration.
public  CtLocalVariableReference<T>createLocalVariableReference(CtLocalVariable<T> localVariable)
     Creates a local variable reference that points to an existing local variable (strong referencing).
public  CtLocalVariableReference<T>createLocalVariableReference(CtTypeReference<T> type, String name)
     Creates a local variable reference with its name an type (weak referencing).
public  CtStatementListcreateStatementList(CtBlock block)
     Creates a new statement list from an existing block.
public  CtFieldAccess<T>createThisAccess(CtTypeReference<T> type)
     Creates an access to a this variable (of the form type.this).
public  CtVariableAccess<T>createVariableAccess(CtVariableReference<T> variable, boolean isStatic)
     Creates a variable access.
public  List<CtExpression<?>>createVariableAccesses(List<? extends CtVariable<?>> variables)
     Creates a list of variable accesses.
public  CtAssignment<A, T>createVariableAssignment(CtVariableReference<A> variable, boolean isStatic, CtExpression<T> expression)
     Creates a variable assignment (can be an expression or a statement).
public  CtStatementListcreateVariableAssignments(List<? extends CtVariable> variables, List<? extends CtExpression> expressions)
     Creates a list of statements that contains the assignments of a set of variables.
public  List<R>getReferences(List<E> elements)
     Gets a list of references from a list of elements.
public  Set<ModifierKind>modifiers(ModifierKind... modifiers)
     Creates a modifier set.


Constructor Detail
CodeFactory
public CodeFactory(Factory factory)(Code)
Creates a spoon.reflect.code.CtCodeElement sub-factory.




Method Detail
createBinaryOperator
public CtBinaryOperator<T> createBinaryOperator(CtExpression left, CtExpression right, BinaryOperatorKind kind)(Code)
Creates a binary operator. <
Parameters:
  T - >the type of the expression
Parameters:
  left - the left operand
Parameters:
  right - the right operand
Parameters:
  kind - the operator kind a binary operator expression



createClassAccess
public CtFieldAccess<Class<T>> createClassAccess(CtTypeReference<T> type)(Code)
Creates a class access expression of the form C.class. <
Parameters:
  T - >the actual type of the accessed class if available
Parameters:
  type - a type reference to the accessed class the class access expression.



createCodeSnippetExpression
public CtCodeSnippetExpression<T> createCodeSnippetExpression(String expression)(Code)
Creates a Code Snippet expression. <
Parameters:
  T - > The type of the expression represented by the CodeSnippet
Parameters:
  expression - The string that contains the expression. a new CtCodeSnippetExpression.



createCodeSnippetStatement
public CtCodeSnippetStatement createCodeSnippetStatement(String statement)(Code)
Creates a Code Snippet statement.
Parameters:
  statement - The String containing the statement. a new CtCodeSnippetStatement



createInvocation
public CtInvocation<T> createInvocation(CtExpression target, CtExecutableReference<T> executable, CtExpression... arguments)(Code)
Creates an invocation (can be a statement or an expression). <
Parameters:
  T - >the return type of the invoked method
Parameters:
  target - the target expression
Parameters:
  executable - the invoked executable
Parameters:
  arguments - the argument list the new invocation



createInvocation
public CtInvocation<T> createInvocation(CtExpression target, CtExecutableReference<T> executable, List<CtExpression<?>> arguments)(Code)
Creates an invocation (can be a statement or an expression). <
Parameters:
  T - >the return type of the invoked method
Parameters:
  target - the target expression
Parameters:
  executable - the invoked executable
Parameters:
  arguments - the argument list the new invocation



createLiteral
public CtLiteral<T> createLiteral(T value)(Code)
Creates a literal with a given value. <
Parameters:
  T - >the type of the literal
Parameters:
  value - the value of the litteral a new literal



createLiteralArray
public CtNewArray<T[]> createLiteralArray(T[] value)(Code)
Creates a one-dimension array that must only contain literals.



createLocalVariable
public CtLocalVariable<T> createLocalVariable(CtTypeReference<T> type, String name, CtExpression<T> defaultExpression)(Code)
Creates a local variable declaration. <
Parameters:
  T - >the local variable type
Parameters:
  type - the reference to the type
Parameters:
  name - the name of the variable
Parameters:
  defaultExpression - the assigned default expression a new local variable declaration



createLocalVariableReference
public CtLocalVariableReference<T> createLocalVariableReference(CtLocalVariable<T> localVariable)(Code)
Creates a local variable reference that points to an existing local variable (strong referencing).



createLocalVariableReference
public CtLocalVariableReference<T> createLocalVariableReference(CtTypeReference<T> type, String name)(Code)
Creates a local variable reference with its name an type (weak referencing).



createStatementList
public CtStatementList createStatementList(CtBlock block)(Code)
Creates a new statement list from an existing block.



createThisAccess
public CtFieldAccess<T> createThisAccess(CtTypeReference<T> type)(Code)
Creates an access to a this variable (of the form type.this). <
Parameters:
  T - >the actual type of this
Parameters:
  type - the reference to the type that holds the thisvariable a type.this expression



createVariableAccess
public CtVariableAccess<T> createVariableAccess(CtVariableReference<T> variable, boolean isStatic)(Code)
Creates a variable access.



createVariableAccesses
public List<CtExpression<?>> createVariableAccesses(List<? extends CtVariable<?>> variables)(Code)
Creates a list of variable accesses.
Parameters:
  variables - the variables to be accessed



createVariableAssignment
public CtAssignment<A, T> createVariableAssignment(CtVariableReference<A> variable, boolean isStatic, CtExpression<T> expression)(Code)
Creates a variable assignment (can be an expression or a statement). <
Parameters:
  T - >the type of the assigned variable
Parameters:
  variable - a reference to the assigned variable
Parameters:
  isStatic - tells if the assigned variable is static or not
Parameters:
  expression - the assigned expression a variable assignment



createVariableAssignments
public CtStatementList createVariableAssignments(List<? extends CtVariable> variables, List<? extends CtExpression> expressions)(Code)
Creates a list of statements that contains the assignments of a set of variables.
Parameters:
  variables - the variables to be assigned
Parameters:
  expressions - the assigned expressions a list of variable assignments



getReferences
public List<R> getReferences(List<E> elements)(Code)
Gets a list of references from a list of elements. <
Parameters:
  R - >the expected reference type<
Parameters:
  E - >the element type
Parameters:
  elements - the element list the corresponding list of references



modifiers
public Set<ModifierKind> modifiers(ModifierKind... modifiers)(Code)
Creates a modifier set.
Parameters:
  modifiers - to put in set Set of given modifiers



Fields inherited from spoon.reflect.factory.SubFactory
Factory factory(Code)(Java Doc)

Methods inherited from spoon.reflect.factory.SubFactory
public Factory getFactory()(Code)(Java Doc)
public void setFactory(Factory factory)(Code)(Java Doc)
protected void setParent(CtElement parent, Object... elements)(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.