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


Java ITypedef类代码示例

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


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

示例1: resolveBinding2

import org.eclipse.cdt.core.dom.ast.ITypedef; //导入依赖的package包/类
public ISourceLocation resolveBinding2(IBinding binding) throws URISyntaxException {
	if (binding instanceof ICExternalBinding)
		return resolveICExternalBinding((ICExternalBinding) binding);
	if (binding instanceof ICompositeType)
		return resolveICompositeType((ICompositeType) binding);
	if (binding instanceof IEnumeration)
		return resolveIEnumeration((IEnumeration) binding);
	if (binding instanceof IEnumerator)
		return resolveIEnumerator((IEnumerator) binding);
	if (binding instanceof IFunction)
		return resolveIFunction((IFunction) binding);
	if (binding instanceof IIndexBinding)
		return resolveIIndexBinding((IIndexBinding) binding);
	if (binding instanceof ILabel)
		return resolveILabel((ILabel) binding);
	if (binding instanceof IMacroBinding)
		return resolveIMacroBinding((IMacroBinding) binding);
	if (binding instanceof IProblemBinding)
		return resolveIProblemBinding((IProblemBinding) binding);
	if (binding instanceof ITypedef)
		return resolveITypedef((ITypedef) binding);
	if (binding instanceof IVariable)
		return resolveIVariable((IVariable) binding);
	if (binding instanceof ICPPBinding)
		return resolveICPPBinding((ICPPBinding) binding);
	if (binding instanceof ICPPTwoPhaseBinding)
		return resolveICPPTwoPhaseBinding((ICPPTwoPhaseBinding) binding);
	// TODO: throw Exception here
	return makeBinding("UNKNOWN1", null, null);
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:31,代码来源:BindingsResolver.java

示例2: resolveITypedef

import org.eclipse.cdt.core.dom.ast.ITypedef; //导入依赖的package包/类
private ISourceLocation resolveITypedef(ITypedef binding) throws URISyntaxException {
	String scheme;
	if (binding instanceof ICPPAliasTemplateInstance)
		scheme = "cpp+aliasTemplateInstance";
	else
		scheme = "cpp+typedef";
	return URIUtil.changeScheme(URIUtil.getChildLocation(resolveOwner(binding), binding.getName()), scheme);
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:9,代码来源:BindingsResolver.java

示例3: evaluate

import org.eclipse.cdt.core.dom.ast.ITypedef; //导入依赖的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

示例4: resolveType

import org.eclipse.cdt.core.dom.ast.ITypedef; //导入依赖的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

示例5: resolveITypedef

import org.eclipse.cdt.core.dom.ast.ITypedef; //导入依赖的package包/类
private IConstructor resolveITypedef(ITypedef type) {
	IType _type = type.getType();
	throw new RuntimeException("NYI: resolveITypedef");
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:5,代码来源:TypeResolver.java


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