|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.datastore.VersionStorage
fr.ifremer.isisfish.datastore.CodeSourceStorage
fr.ifremer.isisfish.datastore.JavaSourceStorage
public abstract class JavaSourceStorage
Classes abstraite permettant la gestion des fichiers de code source.
Exemple :
SimulationPlanStorage
ExportStorage,
RuleStorage,
ScriptStorage,
SensitivityAnalysisStorage,
SimulatorStorage
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage |
|---|
CodeSourceStorage.Location |
| Field Summary | |
|---|---|
protected static String |
PARAM_PREFIX
Le prefix de tous les attributs java manipulable par Isis. |
| Fields inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage |
|---|
content, lastContentLength, lastContentUpdate, name |
| Fields inherited from class fr.ifremer.isisfish.datastore.VersionStorage |
|---|
changeListeners, file, root |
| Constructor Summary | |
|---|---|
protected |
JavaSourceStorage(File rootSrc,
File directory,
String name)
Build a new java source storage. |
| Method Summary | |
|---|---|
int |
compile(boolean force,
PrintWriter out)
Compile cette classe dans le répertoire par defaut de compilation ( IsisConfig.getCompileDirectory()) |
int |
doJavadoc(boolean force,
PrintWriter out)
Build class javadoc. |
Class<?> |
getCodeClass()
Retourne la classe compilée. |
String |
getDescription()
Get docable element description. |
protected static Doc |
getFieldDoc(Class klass,
String paramName)
|
Doc |
getFieldDoc(String paramName)
Field documentation (if any). |
String |
getFQN()
Return class fully qualified name. |
static String |
getName(Object instance)
Retourne le nom de la classe (sans le package) a partir d'un objet. |
Object |
getNewInstance()
Retourne une nouvelle instance de la class. |
static String |
getParamAsString(Object instance)
Recupere les parametres et leur valeur pour les retourner sous forme de chaine. |
static Doc |
getParameterDoc(Object object,
String paramName)
Get doc of parameter. |
Map<String,Class<?>> |
getParameterNames()
Permet de recuperer les parametres de l'export. |
static Map<String,Class<?>> |
getParameterNames(Object instance)
Recherche par introspection tous les parametres de la classe commencant par PARAM_PREFIX. |
static Class |
getParameterType(Object instance,
String name)
Donne le type d'un paramametre par introspection. |
static Object |
getParameterValue(Object instance,
String name)
Donne la valeur d'un parametre par introspection. |
static void |
setParameterValue(Object instance,
String name,
Object value)
Modifie la valeur d'un attribut par introspection. |
| Methods inherited from class fr.ifremer.isisfish.datastore.CodeSourceStorage |
|---|
exists, getContent, getFiles, getName, nonEmptyLocation, prepare, reload, setContent, setContent |
| Methods inherited from class fr.ifremer.isisfish.datastore.VersionStorage |
|---|
add, addStorageChangeListener, checkout, commit, delete, diff, fireDataChanged, getCommunityDatabaseDirectory, getCommunityVCS, getContextDatabaseDirectory, getCurrentVCS, getCurrentVCS, getFile, getFiles, getRemoteStorageNames, getRoot, getStorageNames, getVCS, isOnRemote, isUpToDate, isVersionnableFile, removeStorageChangeListener, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String PARAM_PREFIX
| Constructor Detail |
|---|
protected JavaSourceStorage(File rootSrc,
File directory,
String name)
rootSrc - sources root directorydirectory - class location directory (rootSrc subdirectory)name - class name| Method Detail |
|---|
public String getFQN()
public static String getName(Object instance)
instance - l'instance dont on veut le nom
public int compile(boolean force,
PrintWriter out)
IsisConfig.getCompileDirectory())
force - si vrai alors meme si le fichier destination est plus recent
la compilation aura lieuout - le flux sur lequel le resultat de la compilation doit
apparaitre. Peut-etre null, dans ce cas les sorties standards sont
utilisées.
public int doJavadoc(boolean force,
PrintWriter out)
IsisConfig.getJavadocDirectory()
force - force javadoc build even if destination file is neverout - output print stream. if nullReturns:
public Class<?> getCodeClass()
throws IsisFishException
IsisFishException
public Object getNewInstance()
throws IsisFishException
IsisFishException - if can't make new instance
protected static Doc getFieldDoc(Class klass,
String paramName)
throws SecurityException,
NoSuchFieldException
SecurityException
NoSuchFieldException
public static Doc getParameterDoc(Object object,
String paramName)
object - object containing parameterparamName - parameter name
Doc annotationpublic Doc getFieldDoc(String paramName)
Docable
getFieldDoc in interface DocableparamName - the name of the param to inspect
public String getDescription()
getDescription in interface Docable
public Map<String,Class<?>> getParameterNames()
throws IsisFishException
IsisFishException - s'il est impossible de retourner une map
convenablepublic static Map<String,Class<?>> getParameterNames(Object instance)
PARAM_PREFIX.
instance - the instance to inspect
public static Object getParameterValue(Object instance,
String name)
throws IsisFishException
name - le nom du parametreinstance - the instance to inspect
IsisFishException - if any exception
public static Class getParameterType(Object instance,
String name)
throws IsisFishException
instance - intance to inspectname - parameter name
IsisFishException - if parameter doesn't exists
public static void setParameterValue(Object instance,
String name,
Object value)
throws IsisFishException
name - le nom de l'attributvalue - la valeur de l'attributinstance - the instance to inspect
IsisFishException - if any exception
public static String getParamAsString(Object instance)
throws IsisFishException
instance - the instance to inspect
IsisFishException - if any exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||