本文整理汇总了Java中org.aikodi.chameleon.workspace.View.language方法的典型用法代码示例。如果您正苦于以下问题:Java View.language方法的具体用法?Java View.language怎么用?Java View.language使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.aikodi.chameleon.workspace.View
的用法示例。
在下文中一共展示了View.language方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assignableTo
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
public boolean assignableTo(Type other) throws LookupException {
View view = view();
ObjectOrientedLanguage language = view.language(ObjectOrientedLanguage.class);
Type objType = language.getDefaultSuperClass(view.namespace());
return super.assignableTo(other) ||
( // Reference type
elementType().subtypeOf(objType) &&
(other instanceof ArrayType) &&
elementType().assignableTo(((ArrayType)other).elementType())
) ||
( // Primitive type
(! elementType().subtypeOf(objType)) &&
(other instanceof ArrayType) &&
elementType().equals(((ArrayType)other).elementType())
);
}
示例2: process
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
public List<SecondPhaseConstraint> process() throws LookupException {
List<SecondPhaseConstraint> result = new ArrayList<SecondPhaseConstraint>();
// If A is the type of null, no constraint is implied on Tj.
Type A = A();
View view = A.view();
ObjectOrientedLanguage l = view.language(ObjectOrientedLanguage.class);
if(! A.equals(l.getNullType(view.namespace()))) {
result.addAll(processFirstLevel());
}
return result;
}
示例3: processUnresolvedParameters
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
private void processUnresolvedParameters() throws LookupException {
// JLS 15.12.2.8
// In context of assignment with type S.
if(inContextOfAssignmentConversion()) {
processUnresolved(S());
} else {
// Perform under the assumption that S is java.lang.Object
if(! unresolvedParameters().isEmpty()) {
View view = invocation().view();
ObjectOrientedLanguage language = (ObjectOrientedLanguage) view.language();
processUnresolved((JavaTypeReference) language.createTypeReferenceInNamespace(language.getDefaultSuperClassFQN(),view.namespace()));
}
}
}
示例4: setContainer
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
@Override
public <T extends ViewPlugin> void setContainer(View view, Class<T> pluginInterface) {
if(! (view.language() instanceof JLo)) {
throw new ChameleonProgrammerException();
}
super.setContainer(view, pluginInterface);
Java7 target = new Java7LanguageFactory().create();
JavaView targetView = new JavaView(new LazyRootNamespace(), target);
// target.setPlugin(Syntax.class, new JLoSyntax()); // DEBUG for viewing the intermediate steps, we attach the JLo syntax.
_translator = new JLoToJava8Translator(view(), targetView);
}
示例5: findType
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
private Type findType(View view, String fqn) throws LookupException {
Java7 lang = (Java7) view.language();
return lang.findType(fqn,view.namespace());
}
示例6: getDirectExceptions
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
public Set getDirectExceptions() throws LookupException {
View view = view();
ObjectOrientedLanguage language = view.language(ObjectOrientedLanguage.class);
return Util.createNonNullSet(language.getNullInvocationException(view.namespace()));
}
示例7: lowerBound
import org.aikodi.chameleon.workspace.View; //导入方法依赖的package包/类
@Override
public Type lowerBound() throws LookupException {
View view = view();
ObjectOrientedLanguage l = view.language(ObjectOrientedLanguage.class);
return l.getNullType(view.namespace());
}