當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。