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


Java DeclarationContainer类代码示例

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


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

示例1: createLocalLookupStrategy

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
public  LookupContext createLocalLookupStrategy(DeclarationContainer element) {
if(element instanceof Namespace) {
	return new JavaNonNestedPackageLookupStrategy((Namespace)element);
} else {
	return super.createLocalLookupStrategy(element);
}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:8,代码来源:JavaLookupFactory.java

示例2: selector

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
public DeclarationSelector<Declaration> selector() {
		return new TwoPhaseDeclarationSelector<Declaration>() {

//			@Override
//			public WeakPartialOrder<Member> order() {
//				return new SelectorWithoutOrder.EqualityOrder<Member>();
//			}
			
			@Override
			protected void applyOrder(List<SelectionResult<Declaration>> tmp) throws LookupException {
				
			}

			@Override
			public boolean selectedBasedOnName(Signature signature) throws LookupException {
				return signature.name().equals(name());
			}

			@Override
			public Class<Declaration> selectedClass() {
				return Declaration.class;
			}

			@Override
			public boolean selectedRegardlessOfName(Declaration declaration) throws LookupException {
				ObjectOrientedLanguage language = (ObjectOrientedLanguage) declaration.language(ObjectOrientedLanguage.class);
				return declaration.is(language.CLASS) == Ternary.TRUE;
			}

			@Override
			public String selectionName(DeclarationContainer container) throws LookupException {
				return name();
			}
			
		};
	}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:37,代码来源:SingleStaticImport.java

示例3: selectionName

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
	return container.nearestAncestor(Type.class).name();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:SuperConstructorDelegatorSelector.java

示例4: selectionName

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
	return invocation().name();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:JavaMethodSelector.java

示例5: selectionName

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
	return _constructorDelegation.nearestAncestor(Type.class).name();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:NamelessConstructorSelector.java

示例6: selectionName

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
	return _name;
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:ConstructorSelector.java

示例7: StaticDemandImport

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
public StaticDemandImport(NameReference<? extends DeclarationContainer> ref) {
	super(ref);
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:4,代码来源:StaticDemandImport.java

示例8: JavaDemandImport

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
public JavaDemandImport(NameReference<? extends DeclarationContainer> ref) {
	super(ref);
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:4,代码来源:JavaDemandImport.java

示例9: selectionName

import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) throws LookupException {
	// FIXME: this is horribly inefficient, but otherwise we must add more redundancy
	//        in the source code.
	return getTarget().getElement().componentType().signature().name();
}
 
开发者ID:markovandooren,项目名称:jlo,代码行数:7,代码来源:SubobjectConstructorCall.java


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