| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This inteface contains useful utility language-dependent methods.
An instance of SciLanguageHelper for a specific language can be obtained using
SciModel.getLanguageHelper(String lagnuage) method.
| Method Summary | |
SciFileEnumeration | allFiles(SciClass sciClass)Provides access to all files containing declaration and definitions of class and its members. |
SciFileEnumeration | allFiles(SciMember sciMember)Provides access to all files containing member declaration and definition. |
String | convertMemberQualifiedNameToPresentableForm(String qName)Converts the member's qualified name from Together's internal format to the normal string like "Hashtable.containsKey". |
String | convertMemberSignatureToPresentableForm(String signature, SciClass containingClass)Converts the member's signature string from Together's internal format to the normal string like "name(parameterType1, parameterType2, ... |
String | getDefaultConstantOfType(String type)Provides language dependent constant value for specified type. |
String | getDefaultObjectText(String key)Reserved. |
String | getPresentableLanguageName() |
String | getProperty(SciElement element, String key)Provides access to language specific properties of elements. |
String | getShortClassName(String qualifiedName)Extracts a short name from the specified qualified name of a class/interface. |
String | inquirePasteName(SciClass sciClass, SciMember sciMember)Provides possibility to inquire about name of member being pasted to given class. |
boolean | isPrimitiveType(SciType type)Checks whethers the specified type is simple type. |
boolean | isPrimitiveType(String type) |
boolean | isValidIdentifier(String name)Checks whethers the specified name is a valid indentifier for the languge of this SciLanguageHelper |
SciType | makePointerType(SciType type)Creates new SciType which represents pointer to specified type (if supported by language). |
SciType | makeReferenceType(SciType type)Creates new SciType which represents reference to specified type (if supported by language). |
String | setProperty(SciElement element, String key, String value)Provides access to language specific properties of elements. |
| Method Detail |
public SciFileEnumeration allFiles(SciClass sciClass)
public SciFileEnumeration allFiles(SciMember sciMember)
public String convertMemberQualifiedNameToPresentableForm(String qName)
SciOperation named mySciOper
representing this operation:
Class1 {
public myOper(String int){
return null;
}
}
the execution of
SciModel model = SciModelAccess.getModel();
SciLanguageHelper javaHelper = model.getLanguageHelper(SciLanguage.JAVA);
System.out.println(javaHelper.convertMemberQualifiedNameToPresentableForm(mySciOper.getQualifiedName()));
will produce the following output: "Class1.myOper"SciMemberStringpublic String convertMemberSignatureToPresentableForm(String signature, SciClass containingClass)
SciOperation named mySciOper
representing this operation:
Class1 {
public myOper(String int){
return null;
}
}
the execution of
SciModel model = SciModelAccess.getModel();
SciLanguageHelper javaHelper = model.getLanguageHelper(SciLanguage.JAVA);
System.out.println(javaHelper.convertMemberSignatureToPresentableForm(mySciOper.getSignature(), mySciOper.getContainingClass()));
will produce the following output: "myOper(String)"SciClass containing the memberStringpublic String getDefaultConstantOfType(String type)
boolean type in Java,
or bool type in C++); "0" for all integer types
in Java and C++; "null" for all non-primitive types in Java,null string if void type specified.public String getDefaultObjectText(String key)
public String getPresentableLanguageName()
public String getProperty(SciElement element, String key)
null if element has no property with given key or
property value otherwice.public String getShortClassName(String qualifiedName)
public String inquirePasteName(SciClass sciClass, SciMember sciMember)
public boolean isPrimitiveType(SciType type)
true if language currently supported(enabled) and
the specified type is simple in terms of this language. Otherwice returns false.public boolean isPrimitiveType(String type)
public boolean isValidIdentifier(String name)
SciLanguageHelpertrue if the specified string is a vilid identifier, false otherwisepublic SciType makePointerType(SciType type)
public SciType makeReferenceType(SciType type)
public String setProperty(SciElement element, String key, String value)
null when it is necessary to remove a property.
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||