当前位置: 首页>>代码示例>>Java>>正文


Java IArrayType类代码示例

本文整理汇总了Java中org.eclipse.cdt.core.dom.ast.IArrayType的典型用法代码示例。如果您正苦于以下问题:Java IArrayType类的具体用法?Java IArrayType怎么用?Java IArrayType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IArrayType类属于org.eclipse.cdt.core.dom.ast包,在下文中一共展示了IArrayType类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: resolveIArrayType

import org.eclipse.cdt.core.dom.ast.IArrayType; //导入依赖的package包/类
private IConstructor resolveIArrayType(IArrayType type) {
	IConstructor baseType = resolveType(type.getType());
	org.eclipse.cdt.core.dom.ast.IValue size = type.getSize();
	if (size == null || size.numberValue() == null)
		return builder.TypeSymbol_array(baseType);
	return builder.TypeSymbol_array(baseType, vf.integer(size.numberValue().intValue()));
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:8,代码来源:TypeResolver.java

示例2: evaluate

import org.eclipse.cdt.core.dom.ast.IArrayType; //导入依赖的package包/类
/**
 * Processes a detected reference given as type by determining its qualified
 * name and adding it to the current type definition
 *
 * @param type Referenced type
 */
private void evaluate(IType type) throws DOMException {
    if (type == null) {
        return;
    } else if (type instanceof IArrayType) {
        evaluate(((IArrayType) type).getType());
    } else if (type instanceof ICompositeType) {
        ICompositeType compositeType = (ICompositeType) type;

        if (compositeType.getName() != null && compositeType.getName().length() > 0) {
            addReference(compositeType.getName());
        }
    } else if (type instanceof ICPPReferenceType) {
        evaluate(((ICPPReferenceType) type).getType());
    } else if (type instanceof IEnumeration) {
        // is that needed?
        for (IEnumerator enumerator : ((IEnumeration) type).getEnumerators()) {
            if (!type.isSameType(enumerator.getType())) {
                evaluate(enumerator.getType());
            }
        }
    } else if (type instanceof IFunctionType) {
        IFunctionType functionType = (IFunctionType) type;

        for (IType parameterType : functionType.getParameterTypes()) {
            evaluate(parameterType);
        }

        evaluate(functionType.getReturnType());
    } else if (type instanceof IPointerType) {
        evaluate(((IPointerType) type).getType());
    } else if (type instanceof IQualifierType) {
        evaluate(((IQualifierType) type).getType());
    } else if (type instanceof ITypeContainer) {
        evaluate(((ITypeContainer) type).getType());
    } else if (type instanceof ITypedef) {
        evaluate(((ITypedef) type).getType());
    }
}
 
开发者ID:dheraclio,项目名称:dependometer,代码行数:45,代码来源:SourceFileParser.java

示例3: resolveType

import org.eclipse.cdt.core.dom.ast.IArrayType; //导入依赖的package包/类
public IConstructor resolveType(IType type) {
	if (type instanceof IArrayType)
		return resolveIArrayType((IArrayType) type);
	if (type instanceof IBasicType)
		return resolveIBasicType((IBasicType) type);
	if (type instanceof ICompositeType)
		return resolveICompositeType((ICompositeType) type);
	if (type instanceof ICPPAliasTemplate)
		return resolveICPPAliasTemplate((ICPPAliasTemplate) type);
	if (type instanceof ICPPParameterPackType)
		return resolveICPPParameterPackType((ICPPParameterPackType) type);
	if (type instanceof ICPPReferenceType)
		return resolveICPPReferenceType((ICPPReferenceType) type);
	if (type instanceof ICPPTemplateTypeParameter)
		return resolveICPPTemplateTypeParameter((ICPPTemplateTypeParameter) type);
	if (type instanceof ICPPTypeSpecialization)
		return resolveICPPTypeSpecialization((ICPPTypeSpecialization) type);
	if (type instanceof ICPPUnaryTypeTransformation)
		return resolveICPPUnaryTypeTransformation((ICPPUnaryTypeTransformation) type);
	if (type instanceof ICPPUnknownType)
		return resolveICPPUnknownType((ICPPUnknownType) type);
	if (type instanceof IEnumeration)
		return resolveIEnumeration((IEnumeration) type);
	if (type instanceof IFunctionType)
		return resolveIFunctionType((IFunctionType) type);
	if (type instanceof IIndexType)
		return resolveIIndexType((IIndexType) type);
	if (type instanceof IPointerType)
		return resolveIPointerType((IPointerType) type);
	if (type instanceof IProblemBinding)
		return resolveIProblemBinding((IProblemBinding) type);
	if (type instanceof IProblemType)
		return resolveIProblemType((IProblemType) type);
	if (type instanceof IQualifierType)
		return resolveIQualifierType((IQualifierType) type);
	if (type instanceof ITypeContainer)
		return resolveITypeContainer((ITypeContainer) type);
	if (type instanceof ITypedef)
		return resolveITypedef((ITypedef) type);
	return null;
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:42,代码来源:TypeResolver.java


注:本文中的org.eclipse.cdt.core.dom.ast.IArrayType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。