本文整理汇总了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);
}