Professional Documents
Culture Documents
TAFJ DeprecationMechanim
TAFJ DeprecationMechanim
M e c h a nis m
R18
TAFJ D e p r e c a ti o n M e c h a ni s m
Amendment History:
Revisio
Date Amended Name Description
n
Page 2
TAFJ D e p r e c a ti o n M e c h a ni s m
Copyri g h t
Copyright (c) 2014 TEMENOS HOLDINGS NV
All rights reserved.
This document contains proprietary information that is protected by copyright. No part of this document may
be reproduced, transmitted, or made available directly or indirectly to a third party without the express
written agreement of TEMENOS UK Limited. Receipt of this material directly TEMENOS UK Limited
constitutes its express permission to copy. Permission to use or copy this document expressly excludes
modifying it for any purpose, or using it to create a derivative therefrom.
Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland
Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. TAFJdev@temenos.com
Page 3
TAFJ D e p r e c a ti o n M e c h a ni s m
Table of Contents
Copyright................................................................................................................................................ 3
Introduction............................................................................................................................................. 5
The benefits............................................................................................................................................ 5
The Deprecation LEVELs....................................................................................................................... 5
Environment for deprecation................................................................................................................... 6
Deprecating a Keyword (TAFJ Development)........................................................................................ 7
Deprecating a Method (JBC Developer)................................................................................................. 8
Page 4
TAFJ D e p r e c a ti o n M e c h a ni s m
Intro d u c t i o n
Most of the programming languages have a notion of deprecation. JBC is not an exception
and is offering such a mechanism as well.
However, simply deprecating keywords is not sufficient. This document will explain how this
is possible to deprecate methods (in .component) as well as keywords. This will also
describe the implications of a deprecation.
The be n e f i t s
Deprecation is a nice and auto-describing aproach for making an environment evolving.
Since this is a low-level feature, every single developer is immediatelly impacted by a
deprecation and can (has to) act accordingly. This is a binary approach (all or nothing) which
guaranty a full embracement of new features.
Page 5
TAFJ D e p r e c a ti o n M e c h a ni s m
Page 6
TAFJ D e p r e c a ti o n M e c h a ni s m
This option is mandatory for Temenos Internal development (otherwise this is not possible to
deliver the code in Source control). Note that this option “can” be activated for L3
development, but is not mandatory.
Page 7
TAFJ D e p r e c a ti o n M e c h a ni s m
Deprecating a keyword is very easy and needs (logically !) to be done in the TAFJCompiler
project.
Simply add the Token (Keyword) with the addToken as described bellow.
package com.temenos.tafj.basic;
...
And the error (or warning) message issued from the 3rd parameter of DeprecatedToken :
Page 8
TAFJ D e p r e c a ti o n M e c h a ni s m
Page 9
TAFJ D e p r e c a ti o n M e c h a ni s m
/*
* Some com m e n t s
*/
publi c me t h o d GetP ro p e r t y R e c o r d (
INOUT Templat e stri n g ,
INOUT IdInfo stri n g ,
...
)
{
jBC : AA.GET.PROPERTY.RECORD
}
To deprecate it, add, right before the definition of the method (after the hypothetic comments)
the @Deprecated information like this :
/*
* Some com m e n t s
*/
@Depr e c a t e d
publi c me t h o d GetP ro p e r t y R e c o r d (
INOUT Templat e stri n g ,
INOUT IdInfo stri n g ,
...
)
{
jBC : AA.GET.PROPERTY.RECORD
}
Page 10
TAFJ D e p r e c a ti o n M e c h a ni s m
The result will look like the same as for the keywords :
The message is very minimum, and you can enrich it by specifying a replacement by putting
it after “:” in the Annotation.
/*
* Some com m e n t s
*/
@Depr e c a t e d : GetN e w P r o p e r t y(...)
publi c me t h o d GetP ro p e r t y R e c o r d (
INOUT Templat e stri n g ,
INOUT IdInfo stri n g ,
...
The result will be :
Also, if you want this deprecation to have the ERROR level, you can spacify it in-between
brackets like this :
/*
* Some com m e n t s
*/
@Depr e c a t e d ( E RROR) : GetN e w P r o p e r t y(...)
publi c me t h o d GetP ro p e r t y R e c o r d (
INOUT Templat e stri n g ,
INOUT IdInfo stri n g ,
...
And the compilation will fail. Remember, only in the IDE and if “Internal Development”
Page 11