當前位置: 首頁>>代碼示例>>Java>>正文


Java CrossReferenceTarget類代碼示例

本文整理匯總了Java中org.aikodi.chameleon.core.reference.CrossReferenceTarget的典型用法代碼示例。如果您正苦於以下問題:Java CrossReferenceTarget類的具體用法?Java CrossReferenceTarget怎麽用?Java CrossReferenceTarget使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CrossReferenceTarget類屬於org.aikodi.chameleon.core.reference包,在下文中一共展示了CrossReferenceTarget類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: length

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
private int length(CrossReferenceTarget e) {
  if (e instanceof MethodInvocation) {
    CrossReferenceTarget target = ((MethodInvocation) e).getTarget();
    return 1 + (target == null ? 0 : length(target));
  }
  return 0;
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:8,代碼來源:ChainLength.java

示例2: toCodeNamedTargetRef

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public String toCodeNamedTargetRef(NameExpression var)  {
  CrossReferenceTarget target = var.getTarget();
  if(target != null) {
  return toCode(target)+"."+var.name();
  } else {
  	return var.name();
  }
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:9,代碼來源:Java7Syntax.java

示例3: toCodeSuperTarget

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public String toCodeSuperTarget(SuperTarget nt)  {
  StringBuffer result = new StringBuffer();
  CrossReferenceTarget target = nt.getTarget();
if(target != null) {
    result.append(toCode(target));
    result.append(".");
  }
  result.append("super");
  return result.toString();
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:11,代碼來源:Java7Syntax.java

示例4: typeReferenceTarget

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
protected static CrossReferenceTarget typeReferenceTarget(NamedTarget target, Set<? extends Class<? extends Declaration>> classes) {
	if(target == null) {
		return null;
	} else {
		CrossReferenceTarget t = target.getTarget();
		if(t == null) {
			return new MultiTypeReference<Declaration>(target.name(), classes,Declaration.class,Declaration.class);
		} else {
			return new MultiTypeReference<Declaration>(typeReferenceTarget((NamedTarget) t,classes),target.name(), classes ,Declaration.class);
		}
	}
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:13,代碼來源:BasicJavaTypeReference.java

示例5: erasedReference

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@SuppressWarnings("unchecked")
public JavaTypeReference erasedReference() {
	JavaTypeReference result = null;
  CrossReferenceTarget target = getTarget();
  if(target instanceof CrossReference) {
  	CrossReference<? extends Declaration> erasure = language(Java7.class).erasure((CrossReference)target);
  	result = new BasicJavaTypeReference(erasure, name());
  } else if (target == null) {
  	result = new BasicJavaTypeReference(null, name());
  }
  return result;
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:13,代碼來源:BasicJavaTypeReference.java

示例6: createInvocation

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public MethodInvocation createInvocation(String name, CrossReferenceTarget target) {
	return new JavaMethodInvocation(name, target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaExpressionFactory.java

示例7: createInfixOperatorInvocation

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public InfixOperatorInvocation createInfixOperatorInvocation(String name, CrossReferenceTarget target) {
	return new JavaInfixOperatorInvocation(name, target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaExpressionFactory.java

示例8: createPrefixOperatorInvocation

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public PrefixOperatorInvocation createPrefixOperatorInvocation(String name, CrossReferenceTarget target) {
	return new JavaPrefixOperatorInvocation(name, target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaExpressionFactory.java

示例9: createPostfixOperatorInvocation

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public PostfixOperatorInvocation createPostfixOperatorInvocation(String name, CrossReferenceTarget target) {
	return new JavaPostfixOperatorInvocation(name, target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaExpressionFactory.java

示例10: createNameExpression

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public NameExpression createNameExpression(String name,	CrossReferenceTarget target) {
	return new JavaNameExpression(name,target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaExpressionFactory.java

示例11: createNamedTarget

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public NamedTarget createNamedTarget(String fqn, CrossReferenceTarget target) {
	return new JavaNamedTarget(fqn, target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaExpressionFactory.java

示例12: JavaNamedTarget

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public JavaNamedTarget(String identifier, CrossReferenceTarget target) {
	super(identifier, target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:4,代碼來源:JavaNamedTarget.java

示例13: cloneSelf

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
protected JavaNamedTarget cloneSelf() {
  return new JavaNamedTarget(name(), (CrossReferenceTarget)null);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:5,代碼來源:JavaNamedTarget.java

示例14: JavaPrefixOperatorInvocation

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public JavaPrefixOperatorInvocation(String name, CrossReferenceTarget target) {
	super(name,target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:4,代碼來源:JavaPrefixOperatorInvocation.java

示例15: JavaInfixOperatorInvocation

import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public JavaInfixOperatorInvocation(String name, CrossReferenceTarget target) {
	super(name,target);
}
 
開發者ID:markovandooren,項目名稱:jnome,代碼行數:4,代碼來源:JavaInfixOperatorInvocation.java


注:本文中的org.aikodi.chameleon.core.reference.CrossReferenceTarget類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。