From: Martin Quinson Date: Wed, 9 Mar 2016 21:55:39 +0000 (+0100) Subject: reduce some overly verbose comments X-Git-Tag: v3_13~450^2~16 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1e1c35b1b06811a56db7b80698ec8cea723cf25a reduce some overly verbose comments --- diff --git a/src/bindings/java/org/simgrid/msg/Comm.java b/src/bindings/java/org/simgrid/msg/Comm.java index 86c33cbd5f..8d07c51b9d 100644 --- a/src/bindings/java/org/simgrid/msg/Comm.java +++ b/src/bindings/java/org/simgrid/msg/Comm.java @@ -11,13 +11,9 @@ package org.simgrid.msg; * between processes. */ public class Comm { - /** - * Indicates if the communication is a receiving communication - */ + /** Indicates if the communication is a receiving communication */ protected boolean receiving; - /** - * Indicates if the communication is finished - */ + /** Indicates if the communication is finished */ protected boolean finished = false; /** * Represents the bind between the java comm and the @@ -25,13 +21,9 @@ public class Comm { * automatically set. */ private long bind = 0; - /** - * Represents the bind for the task object pointer. Don't touch it. - */ + /** Represents the bind for the task object pointer. Don't touch it. */ private long taskBind = 0; - /** - * Task associated with the comm. Beware, it can be null - */ + /** Task associated with the comm. Beware, it can be null */ protected Task task = null; /** * Protected constructor, used by Comm factories @@ -75,9 +67,7 @@ public class Comm { return task; } - /** - * Class initializer, to initialize various JNI stuff - */ + /** Class initializer, to initialize various JNI stuff */ public static native void nativeInit(); static { org.simgrid.NativeLib.nativeInit(); diff --git a/src/bindings/java/org/simgrid/msg/File.java b/src/bindings/java/org/simgrid/msg/File.java index 456e474268..633f1ffb9f 100644 --- a/src/bindings/java/org/simgrid/msg/File.java +++ b/src/bindings/java/org/simgrid/msg/File.java @@ -41,9 +41,7 @@ public class File { * @param nMemb is the number of elements of data to write */ public native long write(long size, long nMemb); - /** - * Close the file. - */ + /** Close the file. */ public native void close(); /** Class initializer, to initialize various JNI stuff */ diff --git a/src/bindings/java/org/simgrid/msg/Host.java b/src/bindings/java/org/simgrid/msg/Host.java index ae953ee99d..c15b2afa30 100644 --- a/src/bindings/java/org/simgrid/msg/Host.java +++ b/src/bindings/java/org/simgrid/msg/Host.java @@ -49,18 +49,10 @@ public class Host { * @see Host.getByName(). */ private long bind; - /** - * Host name - */ protected String name; - /** - * User data. - */ + /** User data. */ private Object data; - /** - * - */ protected Host() { this.bind = 0; this.data = null; @@ -84,26 +76,13 @@ public class Host { */ public native static Host getByName(String name) throws HostNotFoundException, NullPointerException; - /** - * This static method returns the count of the installed hosts. - * - * @return The count of the installed hosts. - */ + /** Counts the installed hosts. */ public native static int getCount(); - /** - * This static method return an instance to the host of the current process. - * - * @return The host on which the current process is executed. - */ + /** Returns the host of the current process. */ public native static Host currentHost(); - /** - * This static method returns all of the hosts of the installed platform. - * - * @return An array containing all the hosts installed. - * - */ + /** Returns all hosts of the installed platform. */ public native static Host[] all(); /** @@ -120,99 +99,54 @@ public class Host { public static native void setAsyncMailbox(String mailboxName); - /** - * This method returns the name of a host. - * @return The name of the host. - * - */ + /** Returns the name of an host. */ public String getName() { return name; } - /** - * Sets the data of the host. - * @param data - */ + /** Sets the user data of the host. */ public void setData(Object data) { this.data = data; } - /** - * Gets the data of the host. - * - * @return The data object associated with the host. - */ + /** Gets the user data of the host. */ public Object getData() { return this.data; } - - /** - * Checks whether a host has data. - * - * @return True if the host has an associated data object. - */ + /** Returns true if the host has an associated data object. */ public boolean hasData() { return null != this.data; } - /** - * This method start the host if it is off - */ + /** Starts the host if it is off */ public native void on(); - - /** - * This method stop the host if it is on - */ + /** Stops the host if it is on */ public native void off(); /** - * This method returns the speed of the processor of a host, + * This method returns the speed of the processor of a host (in flops), * regardless of the current load of the machine. - * - * @return The speed of the processor of the host in flops. - * */ public native double getSpeed(); - - /** - * This method returns the number of core of a host. - * - * @return The speed of the processor of the host in flops. - * - */ + /** Returns the number of core of a host. */ public native double getCoreNumber(); - /** - * Returns the value of a given host property. - */ + /** Returns the value of a given host property. */ public native String getProperty(String name); - - /** - * Change the value of a given host property. - */ + /** Changes the value of a given host property. */ public native void setProperty(String name, String value); - - /** This method tests if a host is up and running. - * @return True if the host is available. - */ + /** Tests if an host is up and running. */ public native boolean isOn(); - /** This methods returns the list of mount point names on an host - * @return An array containing all mounted storages on the host - */ + /** Returns the list of mount point names on an host */ public native Storage[] getMountedStorage(); - - /** This methods returns the list of storages attached to an host - * @return An array containing all storages (name) attached to the host - */ + /** This methods returns the list of storages (names) attached to an host */ public native String[] getAttachedStorage(); /** Returns the amount of Joules consumed by that host so far */ public native double getConsumedEnergy(); - /** - * Class initializer, to initialize various JNI stuff - */ + /** Class initializer, to initialize various JNI stuff */ public static native void nativeInit(); static { nativeInit(); diff --git a/src/bindings/java/org/simgrid/msg/HostFailureException.java b/src/bindings/java/org/simgrid/msg/HostFailureException.java index 01eb5b9775..7070131571 100644 --- a/src/bindings/java/org/simgrid/msg/HostFailureException.java +++ b/src/bindings/java/org/simgrid/msg/HostFailureException.java @@ -1,5 +1,3 @@ -/* This exception is raised when looking for a non-existing host. */ - /* Copyright (c) 2006-2014. The SimGrid Team. * All rights reserved. */ @@ -8,9 +6,7 @@ package org.simgrid.msg; -/** - * This exception is raised when the host on which you are running has just been rebooted. - */ +/** This exception is raised when the host on which you are running has just been rebooted. */ public class HostFailureException extends MsgException { private static final long serialVersionUID = 1L; @@ -18,11 +14,7 @@ public class HostFailureException extends MsgException { public HostFailureException() { super(); } - /** - * Constructs an HostFailureException with a detail message. - * - * @param s the detail message. - */ + /** Constructs an HostFailureException with a detail message. */ public HostFailureException(String s) { super(s); } diff --git a/src/bindings/java/org/simgrid/msg/HostNotFoundException.java b/src/bindings/java/org/simgrid/msg/HostNotFoundException.java index 86b830e011..79ef54c6f7 100644 --- a/src/bindings/java/org/simgrid/msg/HostNotFoundException.java +++ b/src/bindings/java/org/simgrid/msg/HostNotFoundException.java @@ -1,5 +1,3 @@ -/* This exception is raised when looking for a non-existing host. */ - /* Copyright (c) 2006-2014. The SimGrid Team. * All rights reserved. */ @@ -8,9 +6,7 @@ package org.simgrid.msg; -/** - * This exception is raised when looking for a non-existing host. - */ +/** This exception is raised when looking for a non-existing host. */ public class HostNotFoundException extends MsgException { private static final long serialVersionUID = 1L; @@ -18,11 +14,7 @@ public class HostNotFoundException extends MsgException { public HostNotFoundException() { super(); } - /** - * Constructs an HostNotFoundException with a detail message. - * - * @param s the detail message. - */ + /** Constructs an HostNotFoundException with a detail message. */ public HostNotFoundException(String s) { super(s); } diff --git a/src/bindings/java/org/simgrid/msg/JniException.java b/src/bindings/java/org/simgrid/msg/JniException.java index ee3cafe397..322ffde831 100644 --- a/src/bindings/java/org/simgrid/msg/JniException.java +++ b/src/bindings/java/org/simgrid/msg/JniException.java @@ -16,20 +16,14 @@ public class JniException extends RuntimeException { private static final long serialVersionUID = 1L; - /** - * Constructs an JniException without a - * detail message. - */ + /** Constructs an JniException without a detail message. */ public JniException() { super(); } - /** - * Constructs an JniException with a detail message. - * - * @param s the detail message. - */ public JniException(String s) { + /** Constructs an JniException with a detail message. */ + public JniException(String s) { super(s); - } + } public JniException(String string, Exception e) { super(string,e); } diff --git a/src/bindings/java/org/simgrid/msg/Msg.java b/src/bindings/java/org/simgrid/msg/Msg.java index 263a22fa3d..d16eb99b1b 100644 --- a/src/bindings/java/org/simgrid/msg/Msg.java +++ b/src/bindings/java/org/simgrid/msg/Msg.java @@ -12,47 +12,26 @@ import org.simgrid.NativeLib; public final class Msg { - /** Retrieve the simulation time - * @return The simulation time. - */ + /** Retrieves the simulation time */ public final static native double getClock(); - /** - * Issue a debug logging message. - * @param s message to log. - */ - public final static native void debug(String s); - /** - * Issue an verbose logging message. - * @param s message to log. - */ - public final static native void verb(String s); - - /** Issue an information logging message - * @param s - */ - public final static native void info(String s); - /** - * Issue an warning logging message. - * @param s message to log. - */ - public final static native void warn(String s); - /** - * Issue an error logging message. - * @param s message to log. - */ - public final static native void error(String s); - /** - * Issue an critical logging message. - * @param s message to log. - */ + /** Issue a debug logging message. */ + public final static native void debug(String msg); + /** Issue a verbose logging message. */ + public final static native void verb(String msg); + /** Issue an information logging message */ + public final static native void info(String msg); + /** Issue a warning logging message. */ + public final static native void warn(String msg); + /** Issue an error logging message. */ + public final static native void error(String msg); + /** Issue a critical logging message. */ public final static native void critical(String s); /********************************************************************************* * Deployment and initialization related functions * *********************************************************************************/ - /** - * The natively implemented method to initialize a MSG simulation. + /** Initialize a MSG simulation. * * @param args The arguments of the command line of the simulation. */ @@ -61,8 +40,7 @@ public final class Msg { /** Tell the kernel that you want to use the energy plugin */ public final static native void energyInit(); - /** - * Run the MSG simulation. + /** Run the MSG simulation. * * The simulation is not cleaned afterward (see * {@link #clean()} if you really insist on cleaning the C side), so you can freely @@ -75,22 +53,12 @@ public final class Msg { @Deprecated public final static void clean(){} - /** - * The native implemented method to create the environment of the simulation. - * - * @param platformFile The XML file which contains the description of the environment of the simulation - * - */ + /** Create the simulation environment by parsing a platform file. */ public final static native void createEnvironment(String platformFile); public final static native As environmentGetRoutingRoot(); - /** - * The method to deploy the simulation. - * - * - * @param deploymentFile - */ + /** Starts your processes by parsing a deployment file. */ public final static native void deployApplication(String deploymentFile); /** Example launcher. You can use it or provide your own launcher, as you wish diff --git a/src/bindings/java/org/simgrid/msg/MsgException.java b/src/bindings/java/org/simgrid/msg/MsgException.java index bebfe327f4..e683264d9d 100644 --- a/src/bindings/java/org/simgrid/msg/MsgException.java +++ b/src/bindings/java/org/simgrid/msg/MsgException.java @@ -8,32 +8,16 @@ package org.simgrid.msg; -/** - * This exception is an abstract class grouping all MSG-related exceptions - * - * - */ +/** This exception is an abstract class grouping all MSG-related exceptions */ public abstract class MsgException extends Exception { private static final long serialVersionUID = 1L; - /** - * Constructs an MsgException without a - * detail message. - */ + /** Constructs an MsgException without a detail message. */ public MsgException() { super(); } - /** - * Constructs an MsgException with a detail message. - * - * @param s the detail message. - */ - public MsgException(String s) { - super(s); + /** Constructs an MsgException with a detail message. */ + public MsgException(String msg) { + super(msg); } } diff --git a/src/bindings/java/org/simgrid/msg/Mutex.java b/src/bindings/java/org/simgrid/msg/Mutex.java index ed7340be75..d670f556db 100644 --- a/src/bindings/java/org/simgrid/msg/Mutex.java +++ b/src/bindings/java/org/simgrid/msg/Mutex.java @@ -8,7 +8,8 @@ package org.simgrid.msg; /** A mutex implemented on top of SimGrid synchronization mechanisms. * You can use it exactly the same way that you use the mutexes, * but to handle the interactions between the processes within the simulation. - * + * + * Don't mix simgrid synchronization with Java native one, or it will deadlock! */ public class Mutex { private long bind; // The C object -- don't touch it @@ -29,9 +30,7 @@ public class Mutex { public native void acquire(); public native void release(); - /** - * Class initializer, to initialize various JNI stuff - */ + /** Class initializer, to initialize various JNI stuff */ public static native void nativeInit(); static { org.simgrid.NativeLib.nativeInit(); diff --git a/src/bindings/java/org/simgrid/msg/NativeException.java b/src/bindings/java/org/simgrid/msg/NativeException.java index 0787db1849..73b25233d9 100644 --- a/src/bindings/java/org/simgrid/msg/NativeException.java +++ b/src/bindings/java/org/simgrid/msg/NativeException.java @@ -8,18 +8,11 @@ package org.simgrid.msg; -/** - * This exception is raised when there is an error within the C world of SimGrid. - * Refer to the string message for more info on what went wrong. - */ +/** This exception is raised when there is an error within the C world of SimGrid. */ public class NativeException extends MsgException { private static final long serialVersionUID = 1L; - /** - * Constructs an NativeException with a detail message. - * - * @param s the detail message. - */ + /** Constructs an NativeException with a detail message. */ public NativeException(String s) { super(s); } diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index f408d1687f..42d1276671 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -47,9 +47,7 @@ public abstract class Process implements Runnable { * access to it. It is set automatically during the build of the object. */ private long bind; - /** - * Indicates if the process is started - */ + /** Indicates if the process is started */ boolean started; /** * Even if this attribute is public you must never access to it. @@ -66,8 +64,7 @@ public abstract class Process implements Runnable { /** Time at which the process should be created */ protected double startTime = 0; - /** Time at which th - * Kill time of the process + /** Time at which the process should be killed. * * Set at creation, and used internally by SimGrid */ @@ -83,9 +80,7 @@ public abstract class Process implements Runnable { public Vector args; - /** - * Default constructor - */ + /** Default constructor */ protected Process() { this.id = nextProcessId++; this.name = null;