Skip to content

Commit

Permalink
refactor(ReferenceBuilder): Remove dead code (#3976)
Browse files Browse the repository at this point in the history
  • Loading branch information
slarse committed Jun 4, 2021
1 parent e2f1353 commit e4baa58
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/main/java/spoon/support/compiler/jdt/ReferenceBuilder.java
Expand Up @@ -114,13 +114,6 @@ public class ReferenceBuilder {
this.jdtTreeBuilder = jdtTreeBuilder;
}

private CtTypeReference<?> getBoundedTypeReference(TypeBinding binding) {
bounds = true;
CtTypeReference<?> ref = getTypeReference(binding);
bounds = false;
return ref;
}

/**
* Builds a type reference from a {@link TypeReference}.
*
Expand Down Expand Up @@ -1028,20 +1021,6 @@ private CtTypeReference<?> getCtCircularTypeReference(TypeBinding b) {
return bindingCache.get(b).clone();
}

@SuppressWarnings("unchecked")
<T> CtVariableReference<T> getVariableReference(MethodBinding methbin) {
CtFieldReference<T> ref = this.jdtTreeBuilder.getFactory().Core().createFieldReference();
ref.setSimpleName(new String(methbin.selector));
ref.setType(getTypeReference(methbin.returnType));

if (methbin.declaringClass != null) {
ref.setDeclaringType(getTypeReference(methbin.declaringClass));
} else {
ref.setDeclaringType(ref.getType());
}
return ref;
}

<T> CtFieldReference<T> getVariableReference(FieldBinding varbin) {
CtFieldReference<T> ref = this.jdtTreeBuilder.getFactory().Core().createFieldReference();
if (varbin == null) {
Expand Down Expand Up @@ -1110,14 +1089,6 @@ <T> CtVariableReference<T> getVariableReference(ProblemBinding binding) {
return ref;
}

List<CtTypeReference<?>> getBoundedTypesReferences(TypeBinding[] genericTypeArguments) {
List<CtTypeReference<?>> res = new ArrayList<>(genericTypeArguments.length);
for (TypeBinding tb : genericTypeArguments) {
res.add(getBoundedTypeReference(tb));
}
return res;
}

/**
* Sets {@code declaring} as inner of {@code ref}, as either the package or the declaring type
*/
Expand Down

0 comments on commit e4baa58

Please sign in to comment.