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


Java View.language方法代码示例

本文整理汇总了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())
         );
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:17,代码来源:ArrayType.java

示例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;
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:13,代码来源:FirstPhaseConstraint.java

示例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()));
		}
	}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:15,代码来源:SecondPhaseConstraintSet.java

示例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);
	}
 
开发者ID:markovandooren,项目名称:jlo,代码行数:12,代码来源:JLoBuilder.java

示例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());
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:PredefinedElementsFactory.java

示例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()));
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:6,代码来源:ArrayAccessExpression.java

示例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());
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:7,代码来源:PureWildcard.java


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