本文整理汇总了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);
}
}
示例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();
}
};
}
示例3: selectionName
import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
return container.nearestAncestor(Type.class).name();
}
示例4: selectionName
import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
return invocation().name();
}
示例5: selectionName
import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
return _constructorDelegation.nearestAncestor(Type.class).name();
}
示例6: selectionName
import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
@Override
public String selectionName(DeclarationContainer container) {
return _name;
}
示例7: StaticDemandImport
import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
public StaticDemandImport(NameReference<? extends DeclarationContainer> ref) {
super(ref);
}
示例8: JavaDemandImport
import org.aikodi.chameleon.core.declaration.DeclarationContainer; //导入依赖的package包/类
public JavaDemandImport(NameReference<? extends DeclarationContainer> ref) {
super(ref);
}
示例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();
}