|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.core.dom.ast.ASTTypeUtil
public class ASTTypeUtil
This is a utility class to help convert AST elements to Strings corresponding to the AST element's type.
Constructor Summary | |
---|---|
ASTTypeUtil()
|
Method Summary | |
---|---|
static char[] |
createNameForAnonymous(IBinding binding)
|
static boolean |
functionTakesParameters(IFunction function)
|
static java.lang.String |
getArgumentListString(ICPPTemplateArgument[] args,
boolean normalize)
Returns a comma-separated list of the string representations of the arguments, enclosed in angle brackets. |
static java.lang.String |
getArgumentString(ICPPTemplateArgument arg,
boolean normalize)
Returns a string representation for an template argument. |
static java.lang.String |
getNodeType(IASTNode node)
For testing purposes, only. |
static java.lang.String |
getParameterTypeString(IFunctionType type)
Returns a string representation for the parameters of the given function type. |
static java.lang.String[] |
getParameterTypeStringArray(IFunctionType type)
Returns an array of normalized string representations for the parameter types of the given function type. |
static java.lang.String |
getType(IASTDeclarator decltor)
For testing purposes, only. |
static java.lang.String |
getType(IASTTypeId typeId)
Returns the type representation of the IASTTypeId as a String. |
static java.lang.String |
getType(IType type)
Returns the normalized string representation of the type. |
static java.lang.String |
getType(IType type,
boolean normalize)
Returns a string representation of a type. |
static java.lang.String |
getTypeListString(IType[] types)
Returns a string representation for the type array. |
static java.lang.String |
getTypeListString(IType[] types,
boolean normalize)
Returns a String representation of the type array as a comma-separated list. |
static boolean |
isConst(IType type)
This can be used to invoke the IType's isConst() if it has an isConst() method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASTTypeUtil()
Method Detail |
---|
public static java.lang.String getParameterTypeString(IFunctionType type)
public static boolean functionTakesParameters(IFunction function) throws DOMException
DOMException
public static java.lang.String getTypeListString(IType[] types)
getTypeListString(IType[], boolean)
public static java.lang.String getTypeListString(IType[] types, boolean normalize)
types
-
public static java.lang.String getArgumentListString(ICPPTemplateArgument[] args, boolean normalize)
normalize
- indicates whether normalization shall be performedpublic static java.lang.String getArgumentString(ICPPTemplateArgument arg, boolean normalize)
normalize
- indicates whether normalization shall be performedpublic static java.lang.String[] getParameterTypeStringArray(IFunctionType type)
getType(IType, boolean)
public static java.lang.String getType(IType type)
getType(IType, boolean)
public static java.lang.String getType(IType type, boolean normalize)
type
- a type to compute the string representation for.normalize
- whether or not normalization should be performed.
public static java.lang.String getType(IASTDeclarator decltor)
public static java.lang.String getNodeType(IASTNode node)
public static java.lang.String getType(IASTTypeId typeId)
typeId
-
public static boolean isConst(IType type)
type
- public static char[] createNameForAnonymous(IBinding binding)
|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |