public class IlrClassTranslation
extends java.lang.Object
implements java.io.Serializable
getBusinessName().
It may refer to a execution class getExecutionName().
It may refer to an extension class getExtenderName().
It may provide a tester getTester().
It may provide translations for its members.| Constructor and Description |
|---|
IlrClassTranslation() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(IlrAttributeTranslation attribute)
Adds a translation for an attribute.
|
void |
addConstructor(IlrConstructorTranslation constructor)
Adds a constructor translation.
|
void |
addImport(java.lang.String importStatement)
Adds an import statement.
|
void |
addMethod(IlrMethodTranslation method)
Adds a method translation.
|
IlrAttributeTranslation |
getAttribute(java.lang.String name)
Gets an attribute translation.
|
java.util.Iterator |
getAttributes()
Returns an iterator over all attribute translations.
|
java.lang.String |
getBusinessName()
Returns the business class name.
|
IlrTranslationConstants.CaseSensitivity |
getCaseSensitivity()
Gets the global case sensitivity for this class member's lookup.
|
IlrConstructorTranslation |
getConstructor(java.lang.String signature)
Returns a constructor translation.
|
java.util.List |
getConstructors()
Returns the list of constructor translations.
|
java.lang.String |
getExecutionName()
Gets the execution class name.
|
java.lang.String |
getExtenderName()
Gets the extender class name.
|
java.util.List |
getImports()
Returns the list of import statements.
|
IlrMethodTranslation |
getMethod(java.lang.String name,
java.lang.String signature)
Returns a method translation.
|
java.util.List |
getMethods(java.lang.String name)
Returns the list of method translations for a given method name.
|
IlrBody |
getTester()
Returns the tester for the business class.
|
boolean |
isTranslated()
Returns
true if the class is to be translated. |
boolean |
removeAttribute(IlrAttributeTranslation attribute)
Removes an attribute translation.
|
boolean |
removeAttribute(java.lang.String name)
Removes an attribute translation.
|
boolean |
removeConstructor(IlrConstructorTranslation constructor)
Removes a constructor translation.
|
boolean |
removeConstructor(java.lang.String signature)
Removes a constructor translation.
|
void |
removeMethod(IlrMethodTranslation method)
Removes a method translation.
|
boolean |
removeMethod(java.lang.String name,
java.lang.String signature)
Removes a method translation.
|
void |
setBusinessName(java.lang.String businessName)
Sets the business class name.
|
void |
setCaseSensitivity(IlrTranslationConstants.CaseSensitivity caseSensitivity)
Sets the case sensitivity for this class member's lookup.
|
void |
setExecutionName(java.lang.String executionName)
Sets the execution class name.
|
void |
setExtenderName(java.lang.String extenderName)
Sets the extender class name.
|
void |
setImports(java.util.List imports)
Sets the list of import statements.
|
void |
setTester(IlrBody tester)
Sets the tester for the business class.
|
void |
setTranslated(boolean translated)
Sets whether this class should be translated or not.
|
public java.lang.String getBusinessName()
null.public void setBusinessName(java.lang.String businessName)
businessName - The business class name. It cannot be null.public java.lang.String getExecutionName()
null. In this case, the translator will use
the business class name as the execution name.public void setExecutionName(java.lang.String executionName)
executionName - The execution class name. It may be null. In this case, the translator will use
the business class name as the execution name.public java.lang.String getExtenderName()
null. In this case,
it means there is no extender class.public void setExtenderName(java.lang.String extenderName)
extenderName - The extender class name. It may be null. In this case,
it means there is no extender class.public boolean isTranslated()
true if the class is to be translated.
A class that is not translated will not produce errors when
translations are checked, but will produce an error if it is used
in a ruleset being translated.public void setTranslated(boolean translated)
public void setCaseSensitivity(IlrTranslationConstants.CaseSensitivity caseSensitivity)
public IlrTranslationConstants.CaseSensitivity getCaseSensitivity()
null. In this case, the case sensitivity of the whole translation configuration applies.public void addImport(java.lang.String importStatement)
java.util.Map, or to a
whole package, such as java.util.*.importStatement - An import statement.public java.util.List getImports()
for a description of the import statement.public void setImports(java.util.List imports)
imports - The list of import statements.for a description of the import statement.public IlrBody getTester()
this can be used to refer to the object being tested.null. In this case, it means that
instances of the execution class will be considered as instances of the business class.public void setTester(IlrBody tester)
tester - The tester.for an explanation of testers.public void addAttribute(IlrAttributeTranslation attribute)
attribute - The attribute translation.public boolean removeAttribute(java.lang.String name)
name - The name of the attribute.true if the attribute translation was removed.public boolean removeAttribute(IlrAttributeTranslation attribute)
attribute - The attribute translation.true if the attribute translation was removed.public IlrAttributeTranslation getAttribute(java.lang.String name)
name - The name of the attribute.null.public java.util.Iterator getAttributes()
public void addMethod(IlrMethodTranslation method)
method - The method translation.public boolean removeMethod(java.lang.String name,
java.lang.String signature)
name - The method name.signature - The method signature.true if the method was removed.public void removeMethod(IlrMethodTranslation method)
method - The method translation.public java.util.List getMethods(java.lang.String name)
name - The name of the methods.public IlrMethodTranslation getMethod(java.lang.String name, java.lang.String signature)
name - The method name.signature - The method signature. The signature of the method follows
the syntax described in IlrMemberWithParametersTranslation.getSignature().name does not contain any
methods, null is returned.public void addConstructor(IlrConstructorTranslation constructor)
constructor - The constructor translation.public boolean removeConstructor(java.lang.String signature)
signature - The signature of the constructor.true if the constructor translation was removed.public boolean removeConstructor(IlrConstructorTranslation constructor)
constructor - The constructor translation to be removed.true if the constructor translation was removed.public java.util.List getConstructors()
public IlrConstructorTranslation getConstructor(java.lang.String signature)
signature - The signature of the constructor. This parameter must
follow the syntax described in
IlrMemberWithParametersTranslation.getSignature().null.© Copyright IBM Corp. 1987, 2017