Java Doc for ValidationJavaTranslator.java in  » UML » AndroMDA-3.2 » org » andromda » translation » ocl » validation » 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 » UML » AndroMDA 3.2 » org.andromda.translation.ocl.validation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.andromda.translation.ocl.BaseTranslator
   org.andromda.translation.ocl.validation.ValidationJavaTranslator

ValidationJavaTranslator
public class ValidationJavaTranslator extends BaseTranslator (Code)

Provides translation of OCL validation constraints to the Java language.


author:
   Wouter Zoons
author:
   Chad Brandon



Constructor Summary
public  ValidationJavaTranslator()
    

Method Summary
public  voidcaseAArrowPropertyCallExpressionTail(AArrowPropertyCallExpressionTail node)
    
public  voidcaseAAttributeOrAssociationContextDeclaration(AAttributeOrAssociationContextDeclaration node)
    
public  voidcaseABodyOperationStereotype(ABodyOperationStereotype node)
    
public  voidcaseAClassifierContextDeclaration(AClassifierContextDeclaration node)
    
public  voidcaseAContextDeclaration(AContextDeclaration node)
     This is the start of a new constraint.
public  voidcaseADefClassifierExpressionBody(ADefClassifierExpressionBody node)
    
public  voidcaseADotPropertyCallExpressionTail(ADotPropertyCallExpressionTail node)
    
public  voidcaseAEqualExpression(AEqualExpression node)
    
public  voidcaseAFeaturePrimaryExpression(AFeaturePrimaryExpression node)
    
public  voidcaseAIfExpression(AIfExpression node)
    
public  voidcaseAInvClassifierExpressionBody(AInvClassifierExpressionBody node)
    
public  voidcaseALetExp(ALetExp node)
    
public  voidcaseALetVariableDeclaration(ALetVariableDeclaration node)
     Here we need to make sure the equals sign '=' is not translated into the 'equal' keyword.
public  voidcaseALogicalExp(ALogicalExp node)
    
public  voidcaseALogicalExpressionTail(ALogicalExpressionTail node)
    
public  voidcaseAMessageExpression(AMessageExpression node)
    
public  voidcaseAOperationContextDeclaration(AOperationContextDeclaration node)
    
public  voidcaseAPostOperationStereotype(APostOperationStereotype node)
    
public  voidcaseAPreOperationStereotype(APreOperationStereotype node)
    
public  voidcaseAPropertyCallExpression(APropertyCallExpression node)
    
public  voidcaseARelationalExpressionTail(ARelationalExpressionTail node)
    
public  voidcaseATypeDeclaration(ATypeDeclaration node)
    
public  voidcaseAVariableDeclaration(AVariableDeclaration node)
     Renders a variable declaration.
public  voidcaseAVariableDeclarationLetExpSub(AVariableDeclarationLetExpSub node)
    
public  voidcaseAVariableDeclarationList(AVariableDeclarationList node)
    
public  voidcaseAVariableDeclarationListTail(AVariableDeclarationListTail node)
    
public  voidcaseTAnd(TAnd tAnd)
    
public  voidcaseTApostrophe(TApostrophe tApostrophe)
    
public  voidcaseTArrow(TArrow tArrow)
    
public  voidcaseTAttr(TAttr tAttr)
    
public  voidcaseTBag(TBag tBag)
    
public  voidcaseTBar(TBar tBar)
    
public  voidcaseTBlank(TBlank tBlank)
    
public  voidcaseTBody(TBody tBody)
    
public  voidcaseTBoolean(TBoolean tBoolean)
    
public  voidcaseTCollection(TCollection tCollection)
    
public  voidcaseTColon(TColon tColon)
    
public  voidcaseTComma(TComma tComma)
    
public  voidcaseTComment(TSingleLineComment tSingleLineComment)
    
public  voidcaseTCommercialAt(TCommercialAt tCommercialAt)
    
public  voidcaseTContext(TContext tContext)
    
public  voidcaseTDef(TDef tDef)
    
public  voidcaseTDerive(TDerive tDerive)
    
public  voidcaseTDiv(TDiv tDiv)
    
public  voidcaseTDot(TDot tDot)
    
public  voidcaseTElse(TElse tElse)
    
public  voidcaseTEndif(TEndif tEndif)
    
public  voidcaseTEndpackage(TEndpackage tEndpackage)
    
public  voidcaseTEnum(TEnum tEnum)
    
public  voidcaseTEqual(TEqual tEqual)
    
public  voidcaseTGt(TGt tGt)
    
public  voidcaseTGteq(TGteq tGteq)
    
public  voidcaseTIf(TIf tIf)
    
public  voidcaseTImplies(TImplies tImplies)
    
public  voidcaseTIn(TIn tIn)
    
public  voidcaseTInit(TInit tInit)
    
public  voidcaseTInt(TInt tInt)
    
public  voidcaseTInv(TInv tInv)
    
public  voidcaseTIsSentOperator(TIsSentOperator tIsSentOperator)
    
public  voidcaseTLBrace(TLBrace tlBrace)
    
public  voidcaseTLBracket(TLBracket tlBracket)
    
public  voidcaseTLParen(TLParen tlParen)
    
public  voidcaseTLet(TLet tLet)
    
public  voidcaseTLt(TLt tLt)
    
public  voidcaseTLteq(TLteq tLteq)
    
public  voidcaseTMessageOperator(TMessageOperator tMessageOperator)
    
public  voidcaseTMinus(TMinus tMinus)
    
public  voidcaseTMult(TMult tMult)
    
public  voidcaseTName(TName node)
    
public  voidcaseTNewLine(TNewLine tNewLine)
    
public  voidcaseTNot(TNot tNot)
    
public  voidcaseTNotEqual(TNotEqual tNotEqual)
    
public  voidcaseTOper(TOper tOper)
    
public  voidcaseTOr(TOr tOr)
    
public  voidcaseTOrderedset(TOrderedset tOrderedset)
    
public  voidcaseTPackage(TPackage tPackage)
    
public  voidcaseTPlus(TPlus tPlus)
    
public  voidcaseTPost(TPost tPost)
    
public  voidcaseTPre(TPre tPre)
    
public  voidcaseTRBrace(TRBrace trBrace)
    
public  voidcaseTRBracket(TRBracket trBracket)
    
public  voidcaseTRParen(TRParen trParen)
    
public  voidcaseTRange(TRange tRange)
    
public  voidcaseTReal(TReal tReal)
    
public  voidcaseTScopeOperator(TScopeOperator tScopeOperator)
    
public  voidcaseTSemicolon(TSemicolon tSemicolon)
    
public  voidcaseTSequence(TSequence tSequence)
    
public  voidcaseTSet(TSet tSet)
    
public  voidcaseTStringLit(TStringLit tStringLit)
    
public  voidcaseTTab(TTab tTab)
    
public  voidcaseTThen(TThen tThen)
    
public  voidcaseTTuple(TTuple tTuple)
    
public  voidcaseTTupletype(TTupletype tTupletype)
    
public  voidcaseTUnknown(TUnknown tUnknown)
    
public  voidcaseTXor(TXor tXor)
    
public  voidhandleArrowFeatureCall(AFeatureCall featureCall)
     Handles an arrow feature call.
public  voidhandleDotFeatureCall(AFeatureCall featureCall)
     Handles a dot feature call.
public  voidinAArrowPropertyCallExpressionTail(AArrowPropertyCallExpressionTail node)
     We need to keep track that what follows is in the scope of an arrow feature call, this is important because it means it is a feature that is implied by the OCL language, rather than the model on which the constraint applies.
public  voidinADotPropertyCallExpressionTail(ADotPropertyCallExpressionTail node)
     This indicates we have entered a feature call, we need to mark this to counterpart any previous arrow feature call flags.
public  voidinALetExp(ALetExp node)
    
public  voidinALetVariableDeclaration(ALetVariableDeclaration node)
     Add a variable to the context.
public  voidinARelationalExpression(ARelationalExpression node)
    
protected  booleanisOperationArgument(String argument)
    
public  voidoutAArrowPropertyCallExpressionTail(AArrowPropertyCallExpressionTail node)
     Undo the arrow feature call trace.
public  voidoutADotPropertyCallExpressionTail(ADotPropertyCallExpressionTail node)
     Undo the dot feature call trace.
public  voidoutALetExp(ALetExp node)
     The variables are out of scope, we need to purge their context.
public  voidoutALetVariableDeclaration(ALetVariableDeclaration node)
     In Java we need to end the declaration statement with a semicolon, this is handled here.
public  voidoutARelationalExpression(ARelationalExpression node)
    
public  voidpostProcess()
     We need to wrap every expression with a converter so that any expressions that return just objects are converted to boolean values.


Constructor Detail
ValidationJavaTranslator
public ValidationJavaTranslator()(Code)




Method Detail
caseAArrowPropertyCallExpressionTail
public void caseAArrowPropertyCallExpressionTail(AArrowPropertyCallExpressionTail node)(Code)



caseAAttributeOrAssociationContextDeclaration
public void caseAAttributeOrAssociationContextDeclaration(AAttributeOrAssociationContextDeclaration node)(Code)



caseABodyOperationStereotype
public void caseABodyOperationStereotype(ABodyOperationStereotype node)(Code)



caseAClassifierContextDeclaration
public void caseAClassifierContextDeclaration(AClassifierContextDeclaration node)(Code)



caseAContextDeclaration
public void caseAContextDeclaration(AContextDeclaration node)(Code)
This is the start of a new constraint. We prepare everything by resetting and initializing the required objects.



caseADefClassifierExpressionBody
public void caseADefClassifierExpressionBody(ADefClassifierExpressionBody node)(Code)



caseADotPropertyCallExpressionTail
public void caseADotPropertyCallExpressionTail(ADotPropertyCallExpressionTail node)(Code)



caseAEqualExpression
public void caseAEqualExpression(AEqualExpression node)(Code)



caseAFeaturePrimaryExpression
public void caseAFeaturePrimaryExpression(AFeaturePrimaryExpression node)(Code)



caseAIfExpression
public void caseAIfExpression(AIfExpression node)(Code)



caseAInvClassifierExpressionBody
public void caseAInvClassifierExpressionBody(AInvClassifierExpressionBody node)(Code)



caseALetExp
public void caseALetExp(ALetExp node)(Code)



caseALetVariableDeclaration
public void caseALetVariableDeclaration(ALetVariableDeclaration node)(Code)
Here we need to make sure the equals sign '=' is not translated into the 'equal' keyword. OCL uses '=' for comparison as well as for assignment, Java uses '==', '=' and .equals() so we override the default OCL value here to use '=' instead of 'equal'



caseALogicalExp
public void caseALogicalExp(ALogicalExp node)(Code)



caseALogicalExpressionTail
public void caseALogicalExpressionTail(ALogicalExpressionTail node)(Code)



caseAMessageExpression
public void caseAMessageExpression(AMessageExpression node)(Code)



caseAOperationContextDeclaration
public void caseAOperationContextDeclaration(AOperationContextDeclaration node)(Code)



caseAPostOperationStereotype
public void caseAPostOperationStereotype(APostOperationStereotype node)(Code)



caseAPreOperationStereotype
public void caseAPreOperationStereotype(APreOperationStereotype node)(Code)



caseAPropertyCallExpression
public void caseAPropertyCallExpression(APropertyCallExpression node)(Code)



caseARelationalExpressionTail
public void caseARelationalExpressionTail(ARelationalExpressionTail node)(Code)



caseATypeDeclaration
public void caseATypeDeclaration(ATypeDeclaration node)(Code)



caseAVariableDeclaration
public void caseAVariableDeclaration(AVariableDeclaration node)(Code)
Renders a variable declaration. Missing types will imply the java.lang.Object type.



caseAVariableDeclarationLetExpSub
public void caseAVariableDeclarationLetExpSub(AVariableDeclarationLetExpSub node)(Code)



caseAVariableDeclarationList
public void caseAVariableDeclarationList(AVariableDeclarationList node)(Code)



caseAVariableDeclarationListTail
public void caseAVariableDeclarationListTail(AVariableDeclarationListTail node)(Code)



caseTAnd
public void caseTAnd(TAnd tAnd)(Code)



caseTApostrophe
public void caseTApostrophe(TApostrophe tApostrophe)(Code)



caseTArrow
public void caseTArrow(TArrow tArrow)(Code)



caseTAttr
public void caseTAttr(TAttr tAttr)(Code)



caseTBag
public void caseTBag(TBag tBag)(Code)



caseTBar
public void caseTBar(TBar tBar)(Code)



caseTBlank
public void caseTBlank(TBlank tBlank)(Code)



caseTBody
public void caseTBody(TBody tBody)(Code)



caseTBoolean
public void caseTBoolean(TBoolean tBoolean)(Code)



caseTCollection
public void caseTCollection(TCollection tCollection)(Code)



caseTColon
public void caseTColon(TColon tColon)(Code)



caseTComma
public void caseTComma(TComma tComma)(Code)



caseTComment
public void caseTComment(TSingleLineComment tSingleLineComment)(Code)



caseTCommercialAt
public void caseTCommercialAt(TCommercialAt tCommercialAt)(Code)



caseTContext
public void caseTContext(TContext tContext)(Code)



caseTDef
public void caseTDef(TDef tDef)(Code)



caseTDerive
public void caseTDerive(TDerive tDerive)(Code)



caseTDiv
public void caseTDiv(TDiv tDiv)(Code)



caseTDot
public void caseTDot(TDot tDot)(Code)



caseTElse
public void caseTElse(TElse tElse)(Code)



caseTEndif
public void caseTEndif(TEndif tEndif)(Code)



caseTEndpackage
public void caseTEndpackage(TEndpackage tEndpackage)(Code)



caseTEnum
public void caseTEnum(TEnum tEnum)(Code)



caseTEqual
public void caseTEqual(TEqual tEqual)(Code)



caseTGt
public void caseTGt(TGt tGt)(Code)



caseTGteq
public void caseTGteq(TGteq tGteq)(Code)



caseTIf
public void caseTIf(TIf tIf)(Code)



caseTImplies
public void caseTImplies(TImplies tImplies)(Code)



caseTIn
public void caseTIn(TIn tIn)(Code)



caseTInit
public void caseTInit(TInit tInit)(Code)



caseTInt
public void caseTInt(TInt tInt)(Code)



caseTInv
public void caseTInv(TInv tInv)(Code)



caseTIsSentOperator
public void caseTIsSentOperator(TIsSentOperator tIsSentOperator)(Code)



caseTLBrace
public void caseTLBrace(TLBrace tlBrace)(Code)



caseTLBracket
public void caseTLBracket(TLBracket tlBracket)(Code)



caseTLParen
public void caseTLParen(TLParen tlParen)(Code)



caseTLet
public void caseTLet(TLet tLet)(Code)



caseTLt
public void caseTLt(TLt tLt)(Code)



caseTLteq
public void caseTLteq(TLteq tLteq)(Code)



caseTMessageOperator
public void caseTMessageOperator(TMessageOperator tMessageOperator)(Code)



caseTMinus
public void caseTMinus(TMinus tMinus)(Code)



caseTMult
public void caseTMult(TMult tMult)(Code)



caseTName
public void caseTName(TName node)(Code)



caseTNewLine
public void caseTNewLine(TNewLine tNewLine)(Code)



caseTNot
public void caseTNot(TNot tNot)(Code)



caseTNotEqual
public void caseTNotEqual(TNotEqual tNotEqual)(Code)



caseTOper
public void caseTOper(TOper tOper)(Code)



caseTOr
public void caseTOr(TOr tOr)(Code)



caseTOrderedset
public void caseTOrderedset(TOrderedset tOrderedset)(Code)



caseTPackage
public void caseTPackage(TPackage tPackage)(Code)



caseTPlus
public void caseTPlus(TPlus tPlus)(Code)



caseTPost
public void caseTPost(TPost tPost)(Code)



caseTPre
public void caseTPre(TPre tPre)(Code)



caseTRBrace
public void caseTRBrace(TRBrace trBrace)(Code)



caseTRBracket
public void caseTRBracket(TRBracket trBracket)(Code)



caseTRParen
public void caseTRParen(TRParen trParen)(Code)



caseTRange
public void caseTRange(TRange tRange)(Code)



caseTReal
public void caseTReal(TReal tReal)(Code)



caseTScopeOperator
public void caseTScopeOperator(TScopeOperator tScopeOperator)(Code)



caseTSemicolon
public void caseTSemicolon(TSemicolon tSemicolon)(Code)



caseTSequence
public void caseTSequence(TSequence tSequence)(Code)



caseTSet
public void caseTSet(TSet tSet)(Code)



caseTStringLit
public void caseTStringLit(TStringLit tStringLit)(Code)



caseTTab
public void caseTTab(TTab tTab)(Code)



caseTThen
public void caseTThen(TThen tThen)(Code)



caseTTuple
public void caseTTuple(TTuple tTuple)(Code)



caseTTupletype
public void caseTTupletype(TTupletype tTupletype)(Code)



caseTUnknown
public void caseTUnknown(TUnknown tUnknown)(Code)



caseTXor
public void caseTXor(TXor tXor)(Code)



handleArrowFeatureCall
public void handleArrowFeatureCall(AFeatureCall featureCall)(Code)
Handles an arrow feature call. Its expected that this featureCall's parent is a AArrowPropertyCallExpressionTail. This is here because arrow feature calls must be handled differently than dot feature calls.
Parameters:
  featureCall - the arrow featureCall to handle.



handleDotFeatureCall
public void handleDotFeatureCall(AFeatureCall featureCall)(Code)
Handles a dot feature call. Its expected that this featureCall's parent is a ADotPropertyCallExpressionTail. This is here because dot feature calls must be handled differently than arrow feature calls.
Parameters:
  featureCall - the dot featureCall to handle.



inAArrowPropertyCallExpressionTail
public void inAArrowPropertyCallExpressionTail(AArrowPropertyCallExpressionTail node)(Code)
We need to keep track that what follows is in the scope of an arrow feature call, this is important because it means it is a feature that is implied by the OCL language, rather than the model on which the constraint applies.



inADotPropertyCallExpressionTail
public void inADotPropertyCallExpressionTail(ADotPropertyCallExpressionTail node)(Code)
This indicates we have entered a feature call, we need to mark this to counterpart any previous arrow feature call flags.



inALetExp
public void inALetExp(ALetExp node)(Code)
We are ready to store a new context of variables



inALetVariableDeclaration
public void inALetVariableDeclaration(ALetVariableDeclaration node)(Code)
Add a variable to the context.



inARelationalExpression
public void inARelationalExpression(ARelationalExpression node)(Code)



isOperationArgument
protected boolean isOperationArgument(String argument)(Code)

See Also:   org.andromda.translation.ocl.BaseTranslator.isOperationArgument(java.lang.String)



outAArrowPropertyCallExpressionTail
public void outAArrowPropertyCallExpressionTail(AArrowPropertyCallExpressionTail node)(Code)
Undo the arrow feature call trace.



outADotPropertyCallExpressionTail
public void outADotPropertyCallExpressionTail(ADotPropertyCallExpressionTail node)(Code)
Undo the dot feature call trace.



outALetExp
public void outALetExp(ALetExp node)(Code)
The variables are out of scope, we need to purge their context.



outALetVariableDeclaration
public void outALetVariableDeclaration(ALetVariableDeclaration node)(Code)
In Java we need to end the declaration statement with a semicolon, this is handled here.



outARelationalExpression
public void outARelationalExpression(ARelationalExpression node)(Code)



postProcess
public void postProcess()(Code)
We need to wrap every expression with a converter so that any expressions that return just objects are converted to boolean values.
See Also:   org.andromda.translation.ocl.BaseTranslator.postProcess



Fields inherited from org.andromda.translation.ocl.BaseTranslator
protected Logger logger(Code)(Java Doc)

Methods inherited from org.andromda.translation.ocl.BaseTranslator
public Object getContextElement()(Code)(Java Doc)
public Expression getExpression()(Code)(Java Doc)
protected OperationDeclaration getOperation()(Code)(Java Doc)
protected String getTranslationFragment(String fragmentName)(Code)(Java Doc)
protected void handleTranslationFragment(Object node)(Code)(Java Doc)
public void inAClassifierContextDeclaration(AClassifierContextDeclaration declaration)(Code)(Java Doc)
public void inADefClassifierExpressionBody(ADefClassifierExpressionBody expressionBody)(Code)(Java Doc)
public void inAInvClassifierExpressionBody(AInvClassifierExpressionBody expressionBody)(Code)(Java Doc)
public void inAOperationContextDeclaration(AOperationContextDeclaration declaration)(Code)(Java Doc)
public void inAOperationExpressionBody(AOperationExpressionBody operationExpressionBody)(Code)(Java Doc)
protected boolean isOperationArgument(String argument)(Code)(Java Doc)
public void postProcess()(Code)(Java Doc)
public void preProcess()(Code)(Java Doc)
protected void process(String expression) throws IOException(Code)(Java Doc)
public Expression translate(String translationName, String expression, Object contextElement)(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.