com.togethersoft.openapi.sci.pattern
Class SciPatternUtil


public class SciPatternUtil

Auxiliary utility class.

Author:
TogetherSoft

Method Summary
 static voidaddAttributeToConstructors(SciAttribute attribute)
           
 static voidaddPatternLink(SciClass source, SciClass target, String patternName, String clientRole, String supplierRole, boolean hidden)
           
 static booleancanCreateInheritance(SciClass inheritor, SciClass base)
           Checks whether base and inheritor are suitable for the inheritance (for example, if inheritor is a class extending a class other than base, this method returns false.
 static booleancanPhysicallyCreateInheritance(SciClass inheritor, SciClass base)
           Checks whether it is possible to modify element.
 static SciAttributecreateAttribute(SciClass currentClass, SciClass attributeClass, String attributeName, boolean aggregation)
           
 static SciOperationcreateGetMethod(SciAttribute attribute)
           
 static voidcreateInheritance(SciClass inheritor, SciClass base)
           Creates inheritance
 static SciOperationcreateSetMethod(SciAttribute attribute)
           
 static voidcreateStubConstructors(SciClass aClass, SciClass baseClass)
           
 static SciAttributecreateVectorAttribute(SciClass currentClass, SciClass attributeClass, String attributeName, boolean aggregation)
           
 static Stringdecapitalize(String base)
           
 static SciClassfindAssociatedPatternLinkClient(SciClass aClass, String patternName, String supplierRole)
           
 static SciAttributefindAttribute(SciClass containingClass, SciClass attributeClass)
           
 static SciClassfindExtendedPatternLinkClient(SciClass aClass, String patternName, String supplierRole)
           
 static SciClassfindPatternLinkSupplier(SciClass aClass, String patternName, String supplierRole)
           
 static EnumerationfindPatternLinkSuppliers(SciClass aClass, String patternName, String supplierRole)
           
 static SciAttributefindVectorAttribute(SciClass containingClass, SciClass attributeClass)
           
 static SciFactorygetFactory(String language)
           
 static SciGenericFactorygetGenericFactory(String language)
           
 static SciModelgetModel()
           
 static SciPatternManagergetPatternManager()
           
 static booleanhasInterfaceTag(SciClass aClass)
           Checks if the specified class has an interface tag.
 static booleanisOperator(SciOperation operation)
           
 static voidmakeDelegatedImplementation(SciOperation operation, String name, boolean checkForNull)
           
 static voidmakeStubImplementation(SciOperation operation)
           
 static voidmakeStubImplementation(SciClass concreteClass, SciClass interfaceClass, boolean implementNonAbstractFunctions, boolean exportDocumentation)
           
 static voidmakeStubInterface(SciClass interfaceClass, SciClass concreteClass, boolean exportDocumentation)
           
 static booleanpatternLinkExists(SciClass source, SciClass target, String patternName, String supplierRole)
           
 static Stringreplace(String text, String oldS, String newS, boolean caseSensitive)
           Replaces oldS in text by newS.
 static StringreplaceMacro(String text, String macro, String value)
           

Method Detail

addAttributeToConstructors

public static void addAttributeToConstructors(SciAttribute attribute)

addPatternLink

public static void addPatternLink(SciClass source, SciClass target, String patternName, String clientRole, String supplierRole, boolean hidden)

canCreateInheritance

public static boolean canCreateInheritance(SciClass inheritor, SciClass base)
Checks whether base and inheritor are suitable for the inheritance (for example, if inheritor is a class extending a class other than base, this method returns false.

canPhysicallyCreateInheritance

public static boolean canPhysicallyCreateInheritance(SciClass inheritor, SciClass base)
Checks whether it is possible to modify element. Checks for "canPaste" etc.

createAttribute

public static SciAttribute createAttribute(SciClass currentClass, SciClass attributeClass, String attributeName, boolean aggregation)

createGetMethod

public static SciOperation createGetMethod(SciAttribute attribute)

createInheritance

public static void createInheritance(SciClass inheritor, SciClass base)
Creates inheritance

createSetMethod

public static SciOperation createSetMethod(SciAttribute attribute)

createStubConstructors

public static void createStubConstructors(SciClass aClass, SciClass baseClass)

createVectorAttribute

public static SciAttribute createVectorAttribute(SciClass currentClass, SciClass attributeClass, String attributeName, boolean aggregation)

decapitalize

public static String decapitalize(String base)

findAssociatedPatternLinkClient

public static SciClass findAssociatedPatternLinkClient(SciClass aClass, String patternName, String supplierRole)

findAttribute

public static SciAttribute findAttribute(SciClass containingClass, SciClass attributeClass)

findExtendedPatternLinkClient

public static SciClass findExtendedPatternLinkClient(SciClass aClass, String patternName, String supplierRole)

findPatternLinkSupplier

public static SciClass findPatternLinkSupplier(SciClass aClass, String patternName, String supplierRole)

findPatternLinkSuppliers

public static Enumeration findPatternLinkSuppliers(SciClass aClass, String patternName, String supplierRole)

findVectorAttribute

public static SciAttribute findVectorAttribute(SciClass containingClass, SciClass attributeClass)

getFactory

public static SciFactory getFactory(String language)

getGenericFactory

public static SciGenericFactory getGenericFactory(String language)

getModel

public static SciModel getModel()

getPatternManager

public static SciPatternManager getPatternManager()

hasInterfaceTag

public static boolean hasInterfaceTag(SciClass aClass)
Checks if the specified class has an interface tag.
Java interfaces are displayed in the diagrams with italic font, unlike classes that are displayed with the plain font. This method is required for c++ classes, to conform with the way of displaying interfaces in the dialgrams.
Parameters:
aClass - SciClass object to be checked
Returns: true if the tags are available for this class

isOperator

public static boolean isOperator(SciOperation operation)

makeDelegatedImplementation

public static void makeDelegatedImplementation(SciOperation operation, String name, boolean checkForNull)

makeStubImplementation

public static void makeStubImplementation(SciOperation operation)

makeStubImplementation

public static void makeStubImplementation(SciClass concreteClass, SciClass interfaceClass, boolean implementNonAbstractFunctions, boolean exportDocumentation)

makeStubInterface

public static void makeStubInterface(SciClass interfaceClass, SciClass concreteClass, boolean exportDocumentation)

patternLinkExists

public static boolean patternLinkExists(SciClass source, SciClass target, String patternName, String supplierRole)

replace

public static String replace(String text, String oldS, String newS, boolean caseSensitive)
Replaces oldS in text by newS.
Parameters:
text - where to replace
oldS - what to replace
newS - new value. If null then just tests for oldS occurence
caseSensitive - whether the search is case sensitive
Returns: new fixed string

replaceMacro

public static String replaceMacro(String text, String macro, String value)

Association Links

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String