net.sourceforge.jenesis4java.ArrayAccess Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jenesis4java Show documentation
Show all versions of jenesis4java Show documentation
Generating Java sources from strings or patterns can become very inconvenient, in those cases Jenesis 4 Java can be a solution for you. Jenesis 4 Java is a DOM
(domain object model) of the Java programming language. The complete java class including annotations and comments is constructed with as a DOM (that can be manipulated in as
many passes you need) until you let it encode to a java file.
The newest version!
package net.sourceforge.jenesis4java;
/*
* #%L
* Jenesis 4 Java Code Generator
* %%
* Copyright (C) 2000 - 2015 jenesis4java
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import java.util.List;
/**
* Copyright (C) 2008, 2010 Richard van Nieuwenhoven - ritchie [at] gmx [dot] at
* Copyright (C) 2000, 2001 Paul Cody Johnston - [email protected]
* This file is part of Jenesis4java. Jenesis4java is free software: you can
* redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
* Jenesis4java is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* You should have received a copy of the GNU Lesser General Public License
* along with Jenesis4java. If not, see .
*/
/**
* {@code Expression} subinterface for array accesses. An {@code ArrayAccess}
* expression specifies the element in an (potentially) multidimensional array.
* For example, to say {@code myArray[2][2][i]}, you might do:
*
*
* arrayAccess.setName("myArray");
* arrayAccess.addDim(intLiteral_2);
* arrayAccess.addDim(intLiteral_2);
* arrayAccess.addDim(reference_i);
*
*/
public interface ArrayAccess extends Accessor {
/**
* Adds the given expression for the next dimension.
*/
ArrayAccess addDim(Expression expr);
/**
* Returns a list of dimension-specifying expressions as an list of
* {@code Expression}.
*/
List getDims();
}