public abstract class JavaSourceStorage extends CodeSourceStorage
SimulationPlanStorage
ExportStorage
,
RuleStorage
,
ScriptStorage
,
SensitivityAnalysisStorage
,
SimulatorStorage
CodeSourceStorage.Location
Modifier and Type | Field and Description |
---|---|
protected static String |
PARAM_PREFIX
Le prefix de tous les attributs java manipulable par Isis.
|
content, lastContentLength, lastContentUpdate, name
file, root
Modifier | Constructor and Description |
---|---|
protected |
JavaSourceStorage(File rootSrc,
File directory,
String name)
Build a new java source storage.
|
Modifier and Type | Method and Description |
---|---|
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.
|
<E> Class<E> |
getCodeClass()
Retourne la classe compilée.
|
String |
getDescription()
Get docable element description.
|
protected static String |
getFieldDoc(Class klass,
String paramName) |
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.
|
<E> E |
getNewInstance()
Retourne une nouvelle instance de la class.
|
abstract String |
getPackage()
Get package name where script should be declared.
|
static String |
getParamAsString(Object instance)
Recupere les parametres et leur valeur pour les retourner sous forme
de chaine.
|
static String |
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.
|
exists, getContent, getFiles, getName, nonEmptyLocation, prepare, reload, setContent, setContent
add, checkout, commit, delete, diff, getCommunityDatabaseDirectory, getCommunityVCS, getContextDatabaseDirectory, getCurrentVCS, getCurrentVCS, getFile, getFiles, getRemoteStorageNames, getRoot, getStorageNames, getVCS, isOnRemote, isUpToDate, isVersionnableFile, registerWatcher, update
protected static final String PARAM_PREFIX
public abstract String getPackage()
public String getFQN()
public static String getName(Object instance)
instance
- l'instance dont on veut le nompublic 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 null standart output will be usedpublic <E> Class<E> getCodeClass() throws IsisFishException
IsisFishException
public <E> E getNewInstance() throws IsisFishException
IsisFishException
- if can't make new instanceprotected static String getFieldDoc(Class klass, String paramName) throws SecurityException, NoSuchFieldException
public static String getParameterDoc(Object object, String paramName)
object
- object containing parameterparamName
- parameter nameDoc
valuepublic String getDescription()
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 inspectpublic static Object getParameterValue(Object instance, String name) throws IsisFishException
name
- le nom du parametreinstance
- the instance to inspectIsisFishException
- if any exceptionpublic static Class getParameterType(Object instance, String name) throws IsisFishException
instance
- intance to inspectname
- parameter nameIsisFishException
- if parameter doesn't existspublic 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 inspectIsisFishException
- if any exceptionpublic static String getParamAsString(Object instance) throws IsisFishException
instance
- the instance to inspectIsisFishException
- if any exceptionCopyright © 1999–2020 CodeLutin. All rights reserved.