martes, 20 de enero de 2009

Java naming rules


The following table lists the rules in the Java naming category:
Rule name Description
Always have an element's name that is a valid Java identifier This rule identifies all model elements that do not follow standard Java naming conventions, because, to transform a UML model into valid Java code, all elements in a model must have names that are valid names in Java.
Always have a type's name starting with upper case This rule identifies all types in a model whose names do not start with an uppercase letter, because the standard naming convention in Java is for type names to start with an uppercase letter.
Always have a feature's name starting with lower case This rule identifies all names of features that do not start with a lowercase letter, because the standard naming convention in Java is for feature names to start with a lowercase letter.
Always have a package's name all in lower case This rule identifies all package names in a model that do not contain all lowercase letters, because the standard naming convention is for package names to contain only lowercase letters.
Avoid naming an attribute similar to one inherited from a super type This rule identifies all types in a model that have attributes whose names are the same as attributes in a supertype, because naming an attribute in a subtype the same as an attribute in a supertype hides the supertype attribute in all specializations.

From: http://publib.boulder.ibm.com/infocenter/rsdhelp/v7r0m0/index.jsp?topic=/com.ibm.xtools.analysis.modelanalysis.doc/topics/rrulesformodelanalysis.html
--
Eduardo R. Coll

No hay comentarios: