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

com.dragome.compiler.ast.ArrayCreation Maven / Gradle / Ivy

There is a newer version: 0.96-beta4
Show newest version
package com.dragome.compiler.ast;

import java.util.List;

import org.apache.bcel.generic.Type;

import com.dragome.compiler.Project;
import com.dragome.compiler.generators.AbstractVisitor;

public class ArrayCreation extends Expression
{

	private List dimensions;

	private ArrayInitializer initializer;

	public ArrayCreation(MethodDeclaration methodDecl, Type theType, List theDimensions)
	{
		type= theType;
		dimensions= theDimensions;
		for (ASTNode dimension : dimensions)
		{
			this.widen(dimension);
		}
		Project.getSingleton().addReference(methodDecl, this);
	}

	public void visit(AbstractVisitor visitor)
	{
		visitor.visit(this);
	}

	public ArrayInitializer getInitializer()
	{
		return initializer;
	}

	public void setInitializer(ArrayInitializer theInitializer)
	{
		initializer= theInitializer;
	}

	public List getDimensions()
	{
		return dimensions;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy