Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'getBinaryFiles' to CompilationUnit. Fixes #1230. #1232

Merged
merged 4 commits into from
Mar 21, 2017

Conversation

msteinbeck
Copy link
Contributor

This is a proposal to fix #1230. I decided to use File#listFiles to detect all available .class files instead of traversing all sub types one after another in order to return existing files only. Did I miss something (except of tests which I will add if you think this method is worth adding to Spoon).

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170317.184213-5

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method java.util.List<java.io.File> spoon.reflect.cu.CompilationUnit::getBinaryFiles()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking source: breaking, semantic: potentially_breaking, binary: non_breaking

@monperrus
Copy link
Collaborator

Thanks for this PR.

What about returning List<SpoonFile> instead of List<File>?

Could you add a test case?

@msteinbeck
Copy link
Contributor Author

Since getFile() returns a File as well, I would stick with File rather than SpoonFile to keep consistency.

@monperrus
Copy link
Collaborator

You're right. OK for File

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170320.234522-9

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method java.util.List<java.io.File> spoon.reflect.cu.CompilationUnit::getBinaryFiles()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking semantic: potentially_breaking, source: breaking, binary: non_breaking

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170320.234522-9

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method java.util.List<java.io.File> spoon.reflect.cu.CompilationUnit::getBinaryFiles()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking semantic: potentially_breaking, binary: non_breaking, source: breaking

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170320.234522-9

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method java.util.List<java.io.File> spoon.reflect.cu.CompilationUnit::getBinaryFiles()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking binary: non_breaking, semantic: potentially_breaking, source: breaking

@msteinbeck
Copy link
Contributor Author

I think I'm done here. Feel free to merge.

@surli surli merged commit db257a1 into INRIA:master Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CompilationUnit: Get path of .class file from CompilationUnit
4 participants