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