Skip to content

Commit

Permalink
Moving base files to 'base' package
Browse files Browse the repository at this point in the history
  • Loading branch information
kniazkov committed Jun 21, 2024
1 parent b0f6704 commit 8370ce1
Show file tree
Hide file tree
Showing 96 changed files with 226 additions and 237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* Performs a deep traversal of the syntax tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.util.HashMap;
import java.util.Map;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* Algorithm for measuring the depth of syntax trees.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

import java.util.HashMap;
import java.util.Map;
import org.cqfn.astranaut.core.DifferenceNode;
import org.cqfn.astranaut.core.Insertion;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.algorithms.mapping.Mapper;
import org.cqfn.astranaut.core.algorithms.mapping.Mapping;
import org.cqfn.astranaut.core.base.DifferenceNode;
import org.cqfn.astranaut.core.base.Insertion;
import org.cqfn.astranaut.core.base.Node;

/**
* Builder of difference syntax tree, that is, one that stores changes between two trees.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.algorithms.hash.SimpleHash;
import org.cqfn.astranaut.core.base.Node;

/**
* A class which finds and returns identical nodes in a tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* An algorithm that selects nodes from a tree based on some criteria.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

import java.util.HashMap;
import java.util.Map;
import org.cqfn.astranaut.core.DifferenceNode;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.PatternNode;
import org.cqfn.astranaut.core.base.DifferenceNode;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.base.PatternNode;

/**
* Pattern builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

import java.util.ArrayList;
import java.util.List;
import org.cqfn.astranaut.core.Builder;
import org.cqfn.astranaut.core.EmptyTree;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Builder;
import org.cqfn.astranaut.core.base.EmptyTree;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.utils.Pair;

/**
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/cqfn/astranaut/core/algorithms/Subtree.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.cqfn.astranaut.core.EmptyTree;
import org.cqfn.astranaut.core.Fragment;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.Type;
import org.cqfn.astranaut.core.base.EmptyTree;
import org.cqfn.astranaut.core.base.Fragment;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.base.Type;

/**
* Algorithm that produces a subtree from the original tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.util.HashMap;
import java.util.Map;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* Computes the absolute hash of a node, that is, a hash that is computed from both the data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.cqfn.astranaut.core.algorithms.hash;

import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* An interface that calculates the hash of a node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.util.HashMap;
import java.util.Map;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* Computes the simple hash of a node, that is, a hash that is computed from the type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.cqfn.astranaut.core.algorithms.mapping;

import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* A mapper that builds correspondences between two trees.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

import java.util.Map;
import java.util.Set;
import org.cqfn.astranaut.core.Insertion;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Insertion;
import org.cqfn.astranaut.core.base.Node;

/**
* A mapping from one syntactic tree ('left') to another ('right'), i.e.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.cqfn.astranaut.core.Insertion;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.algorithms.hash.AbsoluteHash;
import org.cqfn.astranaut.core.algorithms.hash.Hash;
import org.cqfn.astranaut.core.base.Insertion;
import org.cqfn.astranaut.core.base.Node;

/**
* Top-down mapping algorithm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.cqfn.astranaut.core.algorithms.mapping;

import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.base.Node;

/**
* Top-down mapper.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
package org.cqfn.astranaut.core.algorithms.patching;

import java.util.Set;
import org.cqfn.astranaut.core.DifferenceNode;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.PatternNode;
import org.cqfn.astranaut.core.utils.deserializer.ActionList;
import org.cqfn.astranaut.core.base.ActionList;
import org.cqfn.astranaut.core.base.DifferenceNode;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.base.PatternNode;

/**
* Default algorithm that applies patches, i.e. makes some changes in the syntax tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
package org.cqfn.astranaut.core.algorithms.patching;

import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.PatternNode;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.base.PatternNode;

/**
* Interface to an algorithm that applies patches, i.e. makes some changes in the syntax tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.cqfn.astranaut.core.Action;
import org.cqfn.astranaut.core.Delete;
import org.cqfn.astranaut.core.Hole;
import org.cqfn.astranaut.core.Insert;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.PatternNode;
import org.cqfn.astranaut.core.Replace;
import org.cqfn.astranaut.core.algorithms.DeepTraversal;
import org.cqfn.astranaut.core.utils.deserializer.ActionList;
import org.cqfn.astranaut.core.base.Action;
import org.cqfn.astranaut.core.base.ActionList;
import org.cqfn.astranaut.core.base.Delete;
import org.cqfn.astranaut.core.base.Hole;
import org.cqfn.astranaut.core.base.Insert;
import org.cqfn.astranaut.core.base.Node;
import org.cqfn.astranaut.core.base.PatternNode;
import org.cqfn.astranaut.core.base.Replace;

/**
* The matcher matches syntax tree and patterns.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* A node that represents an action that can be performed on another node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core.utils.deserializer;
package org.cqfn.astranaut.core.base;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.cqfn.astranaut.core.DifferenceNode;
import org.cqfn.astranaut.core.Insertion;
import org.cqfn.astranaut.core.Node;
import org.cqfn.astranaut.core.algorithms.DifferenceTreeBuilder;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* This class describes child node within type descriptor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* Some methods/data that could not be placed to other classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* Interface for converters that check one rule described in DSL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.Arrays;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.ArrayList;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* An element of the difference tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* The empty fragment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* Interface for factories selection that selects a suitable factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

/**
* Describes a fragment of source code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.cqfn.astranaut.core;
package org.cqfn.astranaut.core.base;

import java.util.Arrays;
import java.util.Collections;
Expand Down
Loading

0 comments on commit 8370ce1

Please sign in to comment.