| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface contains useful utility language-dependent methods.
An instance of SciLanguageHelper for a specific language can be obtained using
SciModel.getLanguageHelper(String language) method.
| Method Summary | |
SciFileEnumeration | allFiles(SciClass sciClass)Provides access to all files containing declarations and definitions of the class and its members. |
SciFileEnumeration | allFiles(SciMember sciMember)Provides access to all files containing member declarations and definitions. |
String | convertMemberQualifiedNameToPresentableForm(String qName)Converts the member's qualified name from Together's internal format to a normal string like "Hashtable.containsKey". |
String | convertMemberSignatureToPresentableForm(String signature, SciClass containingClass)Converts the member's signature string from Together's internal format to a normal string like "name(parameterType1, parameterType2, ... |
SciComment | getComment(SciObject object, boolean before) |
String | getDefaultConstantOfType(String type)Provides a language-dependent constant value for the 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 the name of the member being pasted to the given class. |
boolean | isPrimitiveType(SciType type)Checks whether the specified type is a simple type. |
boolean | isPrimitiveType(String type) |
boolean | isValidIdentifier(String name)Checks whether the specified name is a valid identifier for the language of this SciLanguageHelper |
SciType | makePointerType(SciType type)Creates new SciType which represents a pointer to the specified type (if supported by the language). |
SciType | makeReferenceType(SciType type)Creates a new SciType which represents a reference to the specified type (if supported by the 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
Class1 {
public myOper(String int){
return null;
}
}
SciModel model = SciModelAccess.getModel();
SciLanguageHelper javaHelper = model.getLanguageHelper(SciLanguage.JAVA);
System.out.println(javaHelper.convertMemberQualifiedNameToPresentableForm(mySciOper.getQualifiedName()));
"Class1.myOper"SciMemberStringpublic String convertMemberSignatureToPresentableForm(String signature, SciClass containingClass)
SciOperation named mySciOper
Class1 {
public myOper(String int){
return null;
}
}
SciModel model = SciModelAccess.getModel();
SciLanguageHelper javaHelper = model.getLanguageHelper(SciLanguage.JAVA);
System.out.println(javaHelper.convertMemberSignatureToPresentableForm(mySciOper.getSignature(), mySciOper.getContainingClass()));
"myOper(String)"SciClass containing the memberStringpublic SciComment getComment(SciObject object, boolean before)
public String getDefaultConstantOfType(String type)
boolean type in Java,
bool type in C++); "0" for all integer types
null string if void type specified.public String getDefaultObjectText(String key)
public String getPresentableLanguageName()
public String getProperty(SciElement element, String key)
null if the element has no property with the given key, or the
public String getShortClassName(String qualifiedName)
public String inquirePasteName(SciClass sciClass, SciMember sciMember)
public boolean isPrimitiveType(SciType type)
true if the language is currently supported (enabled) and
false.public boolean isPrimitiveType(String type)
public boolean isValidIdentifier(String name)
SciLanguageHelpertrue if the specified string is a valid 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 | |||||||||