All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gr.uom.java.xmi.decomposition.AnonymousClassDeclarationObject Maven / Gradle / Ivy

Go to download

RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.

There is a newer version: 3.0.9
Show newest version
package gr.uom.java.xmi.decomposition;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
import org.eclipse.jdt.core.dom.CompilationUnit;

import gr.uom.java.xmi.LocationInfo;
import gr.uom.java.xmi.LocationInfo.CodeElementType;
import gr.uom.java.xmi.diff.CodeRange;
import gr.uom.java.xmi.LocationInfoProvider;

public class AnonymousClassDeclarationObject implements LocationInfoProvider {
	private LocationInfo locationInfo;
	private AnonymousClassDeclaration astNode;
	private String astNodeString;
	private List variables = new ArrayList();
	private List types = new ArrayList();
	private Map> methodInvocationMap = new LinkedHashMap>();
	private List variableDeclarations = new ArrayList();
	private List anonymousClassDeclarations = new ArrayList();
	private List stringLiterals = new ArrayList();
	private List numberLiterals = new ArrayList();
	private List nullLiterals = new ArrayList();
	private List booleanLiterals = new ArrayList();
	private List typeLiterals = new ArrayList();
	private Map> creationMap = new LinkedHashMap>();
	private List infixOperators = new ArrayList();
	private List arrayAccesses = new ArrayList();
	private List prefixExpressions = new ArrayList();
	private List postfixExpressions = new ArrayList();
	private List arguments = new ArrayList();
	private List ternaryOperatorExpressions = new ArrayList();
	private List lambdas = new ArrayList();
	
	public AnonymousClassDeclarationObject(CompilationUnit cu, String filePath, AnonymousClassDeclaration anonymous) {
		this.locationInfo = new LocationInfo(cu, filePath, anonymous, CodeElementType.ANONYMOUS_CLASS_DECLARATION);
		this.astNode = anonymous;
		this.astNodeString = anonymous.toString();
	}

	public LocationInfo getLocationInfo() {
		return locationInfo;
	}

	public AnonymousClassDeclaration getAstNode() {
		return astNode;
	}

	public void setAstNode(AnonymousClassDeclaration node) {
		this.astNode = node;
	}
	
	public String toString() {
		return astNodeString;
	}

	public Map> getMethodInvocationMap() {
		return this.methodInvocationMap;
	}

	public List getVariableDeclarations() {
		return variableDeclarations;
	}

	public List getTypes() {
		return types;
	}

	public List getAnonymousClassDeclarations() {
		return anonymousClassDeclarations;
	}

	public List getStringLiterals() {
		return stringLiterals;
	}

	public List getNumberLiterals() {
		return numberLiterals;
	}

	public List getNullLiterals() {
		return nullLiterals;
	}

	public List getBooleanLiterals() {
		return booleanLiterals;
	}

	public List getTypeLiterals() {
		return typeLiterals;
	}

	public Map> getCreationMap() {
		return creationMap;
	}

	public List getInfixOperators() {
		return infixOperators;
	}

	public List getArrayAccesses() {
		return arrayAccesses;
	}

	public List getPrefixExpressions() {
		return prefixExpressions;
	}

	public List getPostfixExpressions() {
		return postfixExpressions;
	}

	public List getArguments() {
		return this.arguments;
	}

	public List getTernaryOperatorExpressions() {
		return ternaryOperatorExpressions;
	}

	public List getVariables() {
		return variables;
	}

	public List getLambdas() {
		return lambdas;
	}

	public CodeRange codeRange() {
		return locationInfo.codeRange();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy