public class ASTTypeUtil
extends java.lang.Object
String
s corresponding to
the AST element's type.Modifier and Type | Method and Description |
---|---|
static void |
appendType(IType type,
boolean normalize,
java.lang.StringBuilder result)
Appends the the result of
getType(IType, boolean) to the given buffer. |
static char[] |
createNameForAnonymous(IBinding binding) |
static void |
finishTranslationUnit()
Deprecated.
This method is no longer used and is scheduled for removal in 10.0.
|
static boolean |
functionTakesParameters(IFunction function)
Returns whether the function matching the given function binding takes parameters or not.
|
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 |
getParameterTypeStringAndQualifiers(IFunctionType type)
Returns a string representation for the parameters and the qualifiers 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 |
getQualifiedName(ICPPBinding binding)
Returns the qualified name for the given binding including template arguments.
|
static java.lang.String |
getType(IASTDeclarator declarator)
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)
Deprecated.
don't use it does something strange
|
static void |
startTranslationUnit()
Deprecated.
This method is no longer used and is scheduled for removal in 10.0.
|
public static java.lang.String getParameterTypeString(IFunctionType type)
public static java.lang.String getParameterTypeStringAndQualifiers(IFunctionType type)
public static boolean functionTakesParameters(IFunction function)
public static java.lang.String getTypeListString(IType[] types)
getTypeListString(IType[], boolean)
public static java.lang.String getTypeListString(IType[] types, boolean normalize)
types
- normalize
- indicates whether normalization shall be performedpublic 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 void appendType(IType type, boolean normalize, java.lang.StringBuilder result)
getType(IType, boolean)
to the given buffer.public static java.lang.String getType(IASTDeclarator declarator)
public static java.lang.String getNodeType(IASTNode node)
public static java.lang.String getType(IASTTypeId typeId)
typeId
- @Deprecated public static boolean isConst(IType type)
public static java.lang.String getQualifiedName(ICPPBinding binding)
public static char[] createNameForAnonymous(IBinding binding)
@Deprecated public static void startTranslationUnit()
@Deprecated public static void finishTranslationUnit()
Copyright (c) IBM Corp. and others 2004, 2014. All Rights Reserved.