public class SetImportPrimitive extends AbstractPrimitive
changesClassHierarchy, classContent, clazz, modifiedClasses| Constructor and Description |
|---|
SetImportPrimitive(ClassContent classContent,
java.lang.String[] imports) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executePrimitive()
Adds the specified import to the source code file of the class
|
boolean |
isSafe()
Returns if the primitive is safe or not.
|
protected void |
undoPrimitive()
Reverts the changes
|
changeVersion, execute, getSuperClass, getTargetClass, undo, undoUpdateVersion, updateVersion, updateVersionpublic SetImportPrimitive(ClassContent classContent, java.lang.String[] imports)
protected void executePrimitive()
throws StructuralIntercessionException
executePrimitive in class AbstractPrimitiveStructuralIntercessionException - If there are any errorprotected void undoPrimitive()
throws StructuralIntercessionException
undoPrimitive in class AbstractPrimitiveStructuralIntercessionException - If there are any errorpublic boolean isSafe()
AbstractPrimitiveisSafe in interface PrimitiveisSafe in class AbstractPrimitive