Skip to content

Commit

Permalink
Adding headers and auto-javadoc to msi.gama.processor
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Jan 29, 2022
1 parent dd7f6f6 commit 653e897
Show file tree
Hide file tree
Showing 21 changed files with 808 additions and 67 deletions.
13 changes: 13 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/ConstantProcessor.java
@@ -1,9 +1,22 @@
/*******************************************************************************************************
*
* ConstantProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import javax.lang.model.element.Element;

import msi.gama.precompiler.GamlAnnotations.constant;

/**
* The Class ConstantProcessor.
*/
public class ConstantProcessor extends ElementProcessor<constant> {

@Override
Expand Down
13 changes: 13 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/DisplayProcessor.java
@@ -1,10 +1,23 @@
/*******************************************************************************************************
*
* DisplayProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;

import msi.gama.precompiler.GamlAnnotations.display;

/**
* The Class DisplayProcessor.
*/
public class DisplayProcessor extends ElementProcessor<display> {

@Override
Expand Down
@@ -1,10 +1,23 @@
/*******************************************************************************************************
*
* ExperimentProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;

import msi.gama.precompiler.GamlAnnotations.experiment;

/**
* The Class ExperimentProcessor.
*/
public class ExperimentProcessor extends ElementProcessor<experiment> {

@Override
Expand Down
@@ -1,12 +1,12 @@
/*******************************************************************************************************
*
* GamaProcessor.java, in msi.gama.processor, is part of the source code of the GAMA modeling and simulation platform
* (v.1.8.2).
* GamaProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2021 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
*
********************************************************************************************************/
package msi.gama.precompiler;

Expand Down
48 changes: 48 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/IProcessor.java
@@ -1,3 +1,13 @@
/*******************************************************************************************************
*
* IProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import java.lang.annotation.Annotation;
Expand All @@ -13,8 +23,18 @@
*/
public interface IProcessor<T extends Annotation> {

/**
* Process.
*
* @param context the context
*/
default void process(final ProcessorContext context) {}

/**
* Gets the initialization method name.
*
* @return the initialization method name
*/
/*
* Returns the name of the initialization method in which the elements will be written
*
Expand All @@ -24,28 +44,56 @@ default String getInitializationMethodName() {
return null;
}

/**
* Gets the exceptions.
*
* @return the exceptions
*/
/*
* The exceptions that should decorate the initialization method
*/
default String getExceptions() {
return "";
}

/**
* Output to java.
*
* @return true, if successful
*/
/*
* Returns whether or not this processor produces Java code
*/
default boolean outputToJava() {
return true;
}

/**
* Checks for elements.
*
* @return true, if successful
*/
/*
* Returns whether or not this processor has elements to process
*
*/
boolean hasElements();

/**
* Serialize.
*
* @param context the context
* @param elements the elements
* @param sb the sb
*/
void serialize(ProcessorContext context, Collection<StringBuilder> elements, StringBuilder sb);

/**
* Write java body.
*
* @param sb the sb
* @param context the context
*/
void writeJavaBody(StringBuilder sb, ProcessorContext context);

}
13 changes: 13 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/ListenerProcessor.java
@@ -1,3 +1,13 @@
/*******************************************************************************************************
*
* ListenerProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import java.util.List;
Expand All @@ -8,6 +18,9 @@

import msi.gama.precompiler.GamlAnnotations.listener;

/**
* The Class ListenerProcessor.
*/
public class ListenerProcessor extends ElementProcessor<listener> {

@Override
Expand Down
13 changes: 13 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/SkillProcessor.java
@@ -1,10 +1,23 @@
/*******************************************************************************************************
*
* SkillProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;

import msi.gama.precompiler.GamlAnnotations.skill;

/**
* The Class SkillProcessor.
*/
public class SkillProcessor extends ElementProcessor<skill> {

@Override
Expand Down
13 changes: 13 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/SpeciesProcessor.java
@@ -1,10 +1,23 @@
/*******************************************************************************************************
*
* SpeciesProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;

import msi.gama.precompiler.GamlAnnotations.species;

/**
* The Class SpeciesProcessor.
*/
public class SpeciesProcessor extends ElementProcessor<species> {

@Override
Expand Down
15 changes: 15 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/SymbolProcessor.java
@@ -1,3 +1,13 @@
/*******************************************************************************************************
*
* SymbolProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import java.util.HashSet;
Expand All @@ -11,7 +21,12 @@
import msi.gama.precompiler.GamlAnnotations.inside;
import msi.gama.precompiler.GamlAnnotations.symbol;

/**
* The Class SymbolProcessor.
*/
public class SymbolProcessor extends ElementProcessor<symbol> {

/** The temp. */
Set<String> temp = new HashSet<>();

@Override
Expand Down
13 changes: 13 additions & 0 deletions msi.gama.processor/src/msi/gama/precompiler/TypeProcessor.java
@@ -1,3 +1,13 @@
/*******************************************************************************************************
*
* TypeProcessor.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.precompiler;

import java.util.Arrays;
Expand All @@ -15,6 +25,9 @@
import msi.gama.precompiler.GamlAnnotations.type;
import msi.gama.precompiler.doc.utils.TypeConverter;

/**
* The Class TypeProcessor.
*/
public class TypeProcessor extends ElementProcessor<type> {

@Override
Expand Down
26 changes: 18 additions & 8 deletions msi.gama.processor/src/msi/gama/precompiler/doc/Category.java
@@ -1,27 +1,37 @@
/*********************************************************************************************
/*******************************************************************************************************
*
* 'Category.java, in plugin msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform.
* (v. 1.8.1)
* Category.java, in msi.gama.processor, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/UPMC & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and developers contact.
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
*
**********************************************************************************************/
********************************************************************************************************/
package msi.gama.precompiler.doc;

import msi.gama.precompiler.doc.utils.XMLElements;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
* The Class Category.
*/
public class Category implements IElement {

/** The doc. */
Document doc;

/** The id category. */
String idCategory;

/**
* Instantiates a new category.
*
* @param _doc the doc
* @param id the id
*/
public Category(Document _doc, String id){
doc = _doc;
idCategory = id;
Expand Down

0 comments on commit 653e897

Please sign in to comment.