本文整理匯總了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;
}
示例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();
}
}
示例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();
}
示例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);
}
}
}
示例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;
}
示例6: createInvocation
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public MethodInvocation createInvocation(String name, CrossReferenceTarget target) {
return new JavaMethodInvocation(name, target);
}
示例7: createInfixOperatorInvocation
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public InfixOperatorInvocation createInfixOperatorInvocation(String name, CrossReferenceTarget target) {
return new JavaInfixOperatorInvocation(name, target);
}
示例8: createPrefixOperatorInvocation
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public PrefixOperatorInvocation createPrefixOperatorInvocation(String name, CrossReferenceTarget target) {
return new JavaPrefixOperatorInvocation(name, target);
}
示例9: createPostfixOperatorInvocation
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public PostfixOperatorInvocation createPostfixOperatorInvocation(String name, CrossReferenceTarget target) {
return new JavaPostfixOperatorInvocation(name, target);
}
示例10: createNameExpression
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public NameExpression createNameExpression(String name, CrossReferenceTarget target) {
return new JavaNameExpression(name,target);
}
示例11: createNamedTarget
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
public NamedTarget createNamedTarget(String fqn, CrossReferenceTarget target) {
return new JavaNamedTarget(fqn, target);
}
示例12: JavaNamedTarget
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public JavaNamedTarget(String identifier, CrossReferenceTarget target) {
super(identifier, target);
}
示例13: cloneSelf
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
@Override
protected JavaNamedTarget cloneSelf() {
return new JavaNamedTarget(name(), (CrossReferenceTarget)null);
}
示例14: JavaPrefixOperatorInvocation
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public JavaPrefixOperatorInvocation(String name, CrossReferenceTarget target) {
super(name,target);
}
示例15: JavaInfixOperatorInvocation
import org.aikodi.chameleon.core.reference.CrossReferenceTarget; //導入依賴的package包/類
public JavaInfixOperatorInvocation(String name, CrossReferenceTarget target) {
super(name,target);
}