org.andromda.cartridges.ejb
Class EJBScriptHelper

java.lang.Object
  extended by org.andromda.cartridges.ejb.EJBScriptHelper

public class EJBScriptHelper
extends java.lang.Object

Transform class for the EJB cartridge.

Author:
Richard Kunze, Chad Brandon

Constructor Summary
EJBScriptHelper()
           
 
Method Summary
 java.util.Collection filterByVisibility(java.util.Collection list, java.lang.String visibility)
          Filter a list of model elements by visibility.
 java.lang.String getAttributesAsList(java.util.Collection attributes, boolean includeTypes, boolean includeNames)
          Create a comma seperated list of attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBScriptHelper

public EJBScriptHelper()
Method Detail

getAttributesAsList

public java.lang.String getAttributesAsList(java.util.Collection attributes,
                                            boolean includeTypes,
                                            boolean includeNames)
Create a comma seperated list of attributes.

This method can be used to generated e.g. argument lists for constructors, method calls etc.

Parameters:
attributes - a collection of Attribute objects
includeTypes - if true, the type names of the attributes are included.
includeNames - if true, the names of the attributes are included

filterByVisibility

public java.util.Collection filterByVisibility(java.util.Collection list,
                                               java.lang.String visibility)
Filter a list of model elements by visibility.

Parameters:
list - the original list
visibility - the visibility - "public" "protected", "private" or the empty string (for package visibility)
Returns:
a list with all elements from the original list that have a matching visibility.


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.