Skip to content

Commit

Permalink
fix classes generated by CtScanner
Browse files Browse the repository at this point in the history
  • Loading branch information
pvojtechovsky committed Oct 24, 2017
1 parent 339a061 commit 3e6a69f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public <A extends java.lang.annotation.Annotation> void visitCtAnnotation(final
spoon.reflect.declaration.CtAnnotation other = ((spoon.reflect.declaration.CtAnnotation) (this.stack.peek()));
enter(annotation);
biScan(annotation.getType(), other.getType());
biScan(annotation.getTypeCasts(), other.getTypeCasts());
// scan(annotation.getTypeCasts());
biScan(annotation.getComments(), other.getComments());
biScan(annotation.getAnnotationType(), other.getAnnotationType());
biScan(annotation.getAnnotations(), other.getAnnotations());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public <T extends spoon.reflect.declaration.CtElement> T getClone() {
public <A extends java.lang.annotation.Annotation> void visitCtAnnotation(final spoon.reflect.declaration.CtAnnotation<A> annotation) {
spoon.reflect.declaration.CtAnnotation<A> aCtAnnotation = spoon.support.visitor.clone.CloneBuilder.build(this.builder, annotation, annotation.getFactory().Core().createAnnotation());
aCtAnnotation.setType(this.cloneHelper.clone(annotation.getType()));
aCtAnnotation.setTypeCasts(this.cloneHelper.clone(annotation.getTypeCasts()));
aCtAnnotation.setComments(this.cloneHelper.clone(annotation.getComments()));
aCtAnnotation.setAnnotationType(this.cloneHelper.clone(annotation.getAnnotationType()));
aCtAnnotation.setAnnotations(this.cloneHelper.clone(annotation.getAnnotations()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1218,8 +1218,6 @@ public void set(java.util.List replace) {
public <T> void visitCtCatchVariable(final spoon.reflect.code.CtCatchVariable<T> catchVariable) {
replaceInListIfExist(catchVariable.getComments(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementCommentsReplaceListener(catchVariable));
replaceInListIfExist(catchVariable.getAnnotations(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementAnnotationsReplaceListener(catchVariable));
replaceElementIfExist(catchVariable.getDefaultExpression(), new spoon.support.visitor.replace.ReplacementVisitor.CtVariableDefaultExpressionReplaceListener(catchVariable));
replaceElementIfExist(catchVariable.getType(), new spoon.support.visitor.replace.ReplacementVisitor.CtTypedElementTypeReplaceListener(catchVariable));
replaceInListIfExist(catchVariable.getMultiTypes(), new spoon.support.visitor.replace.ReplacementVisitor.CtMultiTypedElementMultiTypesReplaceListener(catchVariable));
}

Expand Down Expand Up @@ -1904,24 +1902,9 @@ public <T> void visitCtFieldWrite(final spoon.reflect.code.CtFieldWrite<T> field
replaceInListIfExist(fieldWrite.getComments(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementCommentsReplaceListener(fieldWrite));
}

// auto-generated, see spoon.generating.ReplacementVisitorGenerator
class CtSuperAccessTypeReplaceListener implements spoon.generating.replace.ReplaceListener<spoon.reflect.reference.CtTypeReference> {
private final spoon.reflect.declaration.CtTypedElement element;

CtSuperAccessTypeReplaceListener(spoon.reflect.declaration.CtTypedElement element) {
this.element = element;
}

@java.lang.Override
public void set(spoon.reflect.reference.CtTypeReference replace) {
this.element.setType(replace);
}
}

// auto-generated, see spoon.generating.ReplacementVisitorGenerator
@java.lang.Override
public <T> void visitCtSuperAccess(final spoon.reflect.code.CtSuperAccess<T> f) {
replaceElementIfExist(f.getType(), new spoon.support.visitor.replace.ReplacementVisitor.CtSuperAccessTypeReplaceListener(f));
replaceInListIfExist(f.getComments(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementCommentsReplaceListener(f));
replaceInListIfExist(f.getAnnotations(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementAnnotationsReplaceListener(f));
replaceInListIfExist(f.getTypeCasts(), new spoon.support.visitor.replace.ReplacementVisitor.CtExpressionTypeCastsReplaceListener(f));
Expand Down

0 comments on commit 3e6a69f

Please sign in to comment.