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

refactor: removes dead code #989

Merged
merged 1 commit into from
Nov 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions src/main/java/spoon/reflect/cu/Import.java

This file was deleted.

33 changes: 0 additions & 33 deletions src/main/java/spoon/reflect/factory/CompilationUnitFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
package spoon.reflect.factory;

import spoon.reflect.cu.CompilationUnit;
import spoon.reflect.cu.Import;
import spoon.reflect.reference.CtFieldReference;
import spoon.reflect.reference.CtPackageReference;
import spoon.reflect.reference.CtTypeReference;
import spoon.support.compiler.jdt.JDTSnippetCompiler;
import spoon.support.reflect.cu.ImportImpl;

import java.io.File;
import java.util.Map;
Expand Down Expand Up @@ -88,32 +83,4 @@ public CompilationUnit removeFromCache(String filePath) {
return cachedCompilationUnits.remove(filePath);
}

/**
* Creates an import for the given type.
*/
public Import createImport(CtTypeReference<?> type) {
return new ImportImpl(type);
}

/**
* Creates an import for the given type.
*/
public Import createImport(Class<?> type) {
return new ImportImpl(factory.Type().createReference(type));
}

/**
* Creates an import for the given field.
*/
public Import createImport(CtFieldReference<?> field) {
return new ImportImpl(field);
}

/**
* Creates an import for the given package.
*/
public Import createImport(CtPackageReference pack) {
return new ImportImpl(pack);
}

}
12 changes: 0 additions & 12 deletions src/main/java/spoon/support/reflect/cu/CompilationUnitImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@

import spoon.processing.FactoryAccessor;
import spoon.reflect.cu.CompilationUnit;
import spoon.reflect.cu.Import;
import spoon.reflect.declaration.CtPackage;
import spoon.reflect.declaration.CtType;
import spoon.reflect.factory.Factory;

import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import static spoon.reflect.ModelElementContainerDefaultCapacities.COMPILATION_UNIT_DECLARED_TYPES_CONTAINER_DEFAULT_CAPACITY;

Expand Down Expand Up @@ -150,8 +147,6 @@ public void setFactory(Factory factory) {

boolean autoImport = true;

Set<Import> manualImports = new HashSet<>();

public boolean isAutoImport() {
return autoImport;
}
Expand All @@ -160,12 +155,5 @@ public void setAutoImport(boolean autoImport) {
this.autoImport = autoImport;
}

public Set<Import> getManualImports() {
return manualImports;
}

public void setManualImports(Set<Import> manualImports) {
this.manualImports = manualImports;
}

}
62 changes: 0 additions & 62 deletions src/main/java/spoon/support/reflect/cu/ImportImpl.java

This file was deleted.