|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.info.LyTag
leon.info.LyInfo
leon.info.LyObjectInfo
leon.info.LyClassInfo
public class LyClassInfo
The instances of this class provide a description of an application class.
Instances of LyClassInfo are a memory representation of the information read from the data
description file.
The data description file (XML) is read at startup : for each tag
Instances of LyClassInfo offer the following services :
LyFieldInfo
,
LyAction
,
LyFilter
,
LyClassBehavior
,
LyCache
Nested Class Summary |
---|
Nested classes/interfaces inherited from class leon.info.LyTag |
---|
LyTag.Model |
Field Summary | |
---|---|
static java.lang.String |
__version
|
static boolean |
ALLOW_NON_ABSTRACT_INHERITED_CLASS
|
static int |
MARK_LOAD
Mark : Load this class on launch. |
static int |
MARK_LOCAL
Mark : To specify that the class is local (no physical representation). |
Fields inherited from class leon.info.LyObjectInfo |
---|
__VERSION, NULL, PART_ALL, PART_BIND, PART_DATA, PART_GUI, PART_LABEL |
Fields inherited from interface leon.data.LyClass |
---|
__VERSION |
Constructor Summary | |
---|---|
LyClassInfo(LyClassInfo template,
boolean local)
Constructs a temporary class info for internal data processings from a given class info template. |
|
LyClassInfo(LyClassInfo template,
java.lang.String binding,
java.lang.String location,
boolean local,
boolean cloneStruct,
boolean keepJavaName,
boolean keepBehavior,
int parts)
Constructs a temporary class info for internal data processings from a given class info template. |
|
LyClassInfo(LyClassInfo template,
java.lang.String binding,
java.lang.String location,
boolean local,
boolean cloneStruct,
int parts)
Constructs a temporary class info for internal data processings from a given class info template. |
|
LyClassInfo(LyClassInfo template,
java.lang.String binding,
java.lang.String location,
boolean local,
int parts)
Constructs a temporary class info for internal data processings from a given class info template. |
Method Summary | |
---|---|
java.lang.String |
checkJavaName(java.lang.String javaName)
check javaName attribute, replace points with underscore. |
void |
clearObjectSourceCache()
Internal use to clear the objectsource cache when the object source has changed. |
boolean |
contains(LyAction action)
Checks if the given action is contained in this classInfo. |
boolean |
contains(LyFieldInfo fieldInfo)
Checks if the given fieldInfo is contained in this classInfo. |
LyValueSet |
copy(java.lang.Object object1,
java.lang.Object object2)
This method does nothing on a classInfo but it has to be present and public because this method is defined in the LyClass interface and LyClassInfo implements this interface. |
LyObject |
createInstance()
Creates a new instance of this class. |
void |
free()
Free a class info. |
boolean |
fromArray()
Checks if this classInfo results from an array definition. |
boolean |
fromStruct()
Checks if this classInfo results from a struct definition. |
LyAction |
getAction(int index)
Fetches the action at the specified index in actions list. |
LyAction |
getAction(java.lang.String id)
Fetches the action with the specified identifier. |
int |
getActionCount()
Returns the number of action supported on this classInfo. |
LyInfoList<LyAction> |
getActions()
Returns the set of actions available on this class info. |
LyInfoList<LyAction> |
getActions(java.util.BitSet marks,
boolean matchAll)
Fetches the list of actions which match (one or all of) the specified marks. |
LyInfoList<LyAction> |
getActions(int mark)
Fetches the list of actions that match the specified mark. |
LyInfoList<LyAction> |
getActions(int mark,
boolean not)
Fetches the list of actions that match (or not match) the specified mark. |
LyInfoList<LyAction> |
getActionsWithId(java.lang.String actionId)
Indicates if this class info has at least one action of the given "type". |
LyAction |
getActionWithId(java.lang.String actionId)
Indicates if this class info has at least one action of the given "type". |
java.lang.Class<?> |
getBehaviorClass()
Gets behavior class. |
java.lang.String |
getBehaviorClassName()
Gets behavior class name. |
LyClassBinding |
getBinding()
Gets the binding information. |
LyInfoCache |
getCachePolicy()
Gets cache policy for this class info. |
LyControl |
getControl(int index)
Fetches the control at the specified index. |
int |
getControlCount()
Return the number of controls associated to this class. |
LyInfoList<LyControl> |
getControls()
Returns the set of controls defined on this class info. |
LyDataSource |
getDataSource()
Gets data source for this class. |
LyAction |
getDefaultAction()
Retrieve the default action for this classInfo. |
java.lang.String |
getDefaultJavaName()
Gets default java class name corresponding to this class info. |
LyField |
getField(java.lang.String id)
Retrieves a field (field info) by its id. |
LyFieldInfo |
getFieldInfo(int index)
Returns the fieldInfo at the specified index in fields list. |
LyFieldInfo |
getFieldInfo(java.lang.String id)
Search the fieldInfo with the given identifier. |
LyFieldInfo |
getFieldInfo(java.lang.String id,
boolean exception)
Search the fieldInfo with the given identifier. |
int |
getFieldInfoCount()
Returns the number of fieldInfos for this classInfo. |
LyInfoList<LyFieldInfo> |
getfieldInfoFromBinding(java.lang.String binding)
Find fieldinfos from the peer value (connector value defined in class binding). |
LyInfoList<LyFieldInfo> |
getFieldInfos()
Gets list of field infos of this class info. |
LyInfoList<LyFieldInfo> |
getFieldInfos(java.util.BitSet marks)
Gets a list of fieldInfos that match the given marks. |
LyInfoList<LyFieldInfo> |
getFieldInfos(java.util.BitSet marks,
boolean matchAll)
Gets list of fieldInfo that match one or all of the given marks. |
LyInfoList<LyFieldInfo> |
getFieldInfos(int mark)
Gets a list of fieldInfos that match the given mark. |
java.util.Vector<LyFieldInfo> |
getFields()
Gets list of fields (field infos) of this class. |
java.util.BitSet |
getGenericMarks()
Accessor to the generic marks attached to this instance. |
java.lang.reflect.Method |
getGetMethod(LyFieldInfo fieldInfo)
Returns get method for the given fieldInfo. |
LyInfoList<LyFieldInfo> |
getIdFieldInfos()
Gets id field infos (field infos that have MARK_ID). |
java.util.Vector<LyFieldInfo> |
getIdFields()
Gets id fields (field infos that identify instances of this class). |
int |
getIndex(LyFieldInfo fieldInfo)
Gets index for the given fielInfo. |
java.lang.String |
getJavaName()
Gets java class name corresponding to this class info when java code generation is used. |
LyInfoLabel |
getLabel(int index)
Returns the label of this classInfo at the given index. |
LyInfoLabel |
getLabel(LyInfoLabel.Type type)
Returns the label of this classInfo for the specified type. |
int |
getLabelCount()
Returns the number of labels of this classInfo. |
LyInfoLabel[] |
getLabels()
Returns all labels of this classInfo. |
static int |
getMark(java.lang.String markName)
Gets mark index corresponding to the given mark name. |
static int |
getMark(java.lang.String markName,
boolean add)
Gets mark index corresponding to the given mark name. |
static java.lang.String |
getMarkName(int markIndex)
Get mark name for the given index of a mark. |
static java.util.BitSet |
getMarks(java.util.BitSet marks,
int parts)
Accessor to the marks attached to this instance (presented as a bitset). |
LyInfoList<LyFieldInfo> |
getNameFieldInfos()
Gets name field infos (field infos that have MARK_NAME). |
int |
getNextCount()
Gets the next value of the internal counter. |
java.lang.Class<?> |
getObjectClass()
Gets physical class used to store physical instances of this application class. |
LyObjectId |
getObjectId(java.lang.Object object)
Gets objectId of a given object. |
LyObjectSource |
getObjectSource()
Returns object source corresponding to this class info. |
LyClass |
getPeerClass()
Gets peer class of this class info. |
java.util.List<LyPeerDataProvider> |
getPeerDataProviders()
Find the connectors for a classinfo Usually there is only one connector but some classes may have multiples (with unions) or none if not bound to any datasource |
LyAction |
getRealAction(LyAction action)
Searchs on this class for an action that "inherits" of the given action. |
LyClassInfo |
getRealClass()
Returns the real class corresponding to this class info. |
LyFieldInfo |
getRealFieldInfo(LyFieldInfo fieldInfo)
Method to check the given field info and return in some cases the real field info. |
LyFieldInfo |
getRealFieldInfo(LyFieldInfo fieldInfo,
boolean exception)
Internal method to check the given field info and return in some cases the real field info. |
LyRoute |
getRoute(int index)
Fetches the route at the specified index. |
LyRoute |
getRoute(java.lang.String id)
Fetches the route with the specified id. |
LyInfoList<LyRoute> |
getRoutes()
Returns the set of routes defined on this class info. |
LyInfoList<LyRoute> |
getRoutes(LyClassInfo classInfo)
Returns a set of routes between this class info and the specified class. |
int |
getRoutesCount()
Return the number of routes in the class. |
LyRule |
getRule(short index)
Gets a rule from the rules list at a given position. |
short |
getRuleCount()
Gets rules count. |
LyInfoList<LyRule> |
getRules()
Returns the list of rules defined on this class info. |
java.lang.reflect.Method |
getSetMethod(LyFieldInfo fieldInfo)
Returns set method for the given fieldInfo. |
LySort |
getSort()
Gets default sort for this classInfo. |
java.lang.String[] |
getSpecificMarks()
Accessor to the marks attached to this instance (presented as an array of strings). |
LyInfoList<LyClassInfo> |
getSubClasses()
Gets the list of sub-classes. |
LyInfoList<LyClassInfo> |
getSubClasses(boolean godown)
Gets the list of sub-classes. |
LyClassInfo |
getSuperClass()
Returns the super class of this class info. |
java.lang.String |
getTip()
Retuns the tip (short help displayed in tool tip) associated to this instance. |
LyInfoLabel |
getUserLabel(int i)
Returns the user label at the given position. |
LyInfoLabel |
getUserLabel(java.lang.String subType)
Returns the user label for the given subType. |
int |
getUserLabelCount()
Returns the number of labels of this classInfo. |
java.lang.Object |
getValue(java.lang.Object object,
LyField field)
Gets value of an object on a given field (field info). |
LyValueSet |
getValues(java.lang.Object object)
Gets values set for the given object. |
LyFieldInfo |
getVirtualFieldInfo(LyFieldInfo fieldInfo)
Returns the field info corresponding to given one in this class info. |
boolean |
inheritsFrom(LyClassInfo classInfo)
Checks if this class info inherits from the given one. |
boolean |
isAbstract()
Checks if this class info is abstract or not. |
boolean |
isDerivated(LyFieldInfo fieldInfo)
Checks if the given field info is derivated : the field info was defined on the super-class or its template. |
boolean |
isInherited(LyFieldInfo fieldInfo)
Checks if the given field info is inherited : the field info was defined on the super-class. |
boolean |
isLocal()
Tests if the class is local (whether it has the mark MARK_LOCAL or not). |
boolean |
isNameDifferentOfId()
Check if this class info has object names : if object name and object id are different for instances of this class info. |
boolean |
isNamePartOfId()
Check if for class info, the name is sub-part of the id. |
boolean |
isTemporary()
Checks if this class is temporary (dynamic built). |
boolean |
isVirtual()
Checks if this class info is virtual or not. |
java.lang.Object |
newInstance()
Creates a new instance of this class. |
void |
rehash(java.lang.Object object)
Recompute the object id of the specified object. |
void |
resetFieldIndexes()
Reset the internal table of indexes used to speed up fieldInfo accesses. |
void |
setApplication(LyApplication application)
Sets the application for this info. |
void |
setCachePolicy(LyInfoCache cache)
Sets cache policy. |
void |
setCheckFieldInsertion(boolean checkFieldInsertion)
Sets the _checkFieldInsertion parameter. |
void |
setValue(java.lang.Object object,
LyField field,
java.lang.Object value)
Sets value of an object on a given field (field info). |
Methods inherited from class leon.info.LyObjectInfo |
---|
clone, getAlias, getData, getDataList, getDatas, getFilePrefix, getGroup, getInternalAlias, getInternalFilePrefix, getInternalName, getMarks, getName, getTemplate, getUserData, hasMark, hasMarks, hasTemplate, isTemplate, putData, putData, removeData, toName |
Methods inherited from class leon.info.LyInfo |
---|
getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setFile, toString |
Methods inherited from class leon.info.LyTag |
---|
getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.data.LyClass |
---|
getId, getName |
Methods inherited from interface leon.parser.LyCommentInterface |
---|
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart |
Field Detail |
---|
public static final java.lang.String __version
public static final int MARK_LOCAL
public static final int MARK_LOAD
public static boolean ALLOW_NON_ABSTRACT_INHERITED_CLASS
Constructor Detail |
---|
public LyClassInfo(LyClassInfo template, boolean local)
template
- Reference of a class template used to initialize this new instance.local
- Boolean indicating if the class info should be local or not.public LyClassInfo(LyClassInfo template, java.lang.String binding, java.lang.String location, boolean local, int parts)
template
- Reference of a class template used to initialize this new instance.binding
- Binding of this temporary class info.location
- Location of the binding.local
- Boolean indicating if the class info should be local or not.public LyClassInfo(LyClassInfo template, java.lang.String binding, java.lang.String location, boolean local, boolean cloneStruct, int parts)
template
- Reference of a class template used to initialize this new instance.binding
- Binding of this temporary class info.location
- Location of the binding.local
- Boolean indicating if the class info should be local or not.cloneStruct
- Boolean indicating if the structFields must be cloned.public LyClassInfo(LyClassInfo template, java.lang.String binding, java.lang.String location, boolean local, boolean cloneStruct, boolean keepJavaName, boolean keepBehavior, int parts)
template
- Reference of a class template used to initialize this new instance.binding
- Binding of this temporary class info.location
- Location of the binding.local
- Boolean indicating if the class info should be local or not.cloneStruct
- Boolean indicating if the structFields must be cloned.keepJavaName
- Boolean indicating if the javaname must be kept.keepBehavior
- Boolean indicating if the behavior must be kept.Method Detail |
---|
public static int getMark(java.lang.String markName, boolean add)
markName
- Mark name.add
- indicates if the.mark must be added if it doesn't exit
public static int getMark(java.lang.String markName)
markName
- Mark name.
public static java.lang.String getMarkName(int markIndex)
markIndex
- Index of the mark.
public void free()
java.lang.IllegalStateException
- If this class info is not temporary.public java.lang.Class<?> getObjectClass()
getObjectClass
in interface LyClass
public LyDataSource getDataSource()
getDataSource
in interface LyClass
public java.util.Vector<LyFieldInfo> getIdFields()
getIdFields
in interface LyClass
public java.util.Vector<LyFieldInfo> getFields()
getFields
in interface LyClass
public LyField getField(java.lang.String id)
getField
in interface LyClass
id
- Id of the searched field.
public LyObjectId getObjectId(java.lang.Object object)
getObjectId
in interface LyClass
object
- Object for which an objectId is requested.
public java.lang.Object getValue(java.lang.Object object, LyField field)
getValue
in interface LyClass
object
- Object instance of this class.field
- Field on which a value is asked.
public void setValue(java.lang.Object object, LyField field, java.lang.Object value)
setValue
in interface LyClass
object
- Object instance of this class.field
- Field on which the value is set.value
- Value to set on the object for the given field.public LyValueSet getValues(java.lang.Object object)
getValues
in interface LyClass
object
- Object on which values are requested.
public LyValueSet copy(java.lang.Object object1, java.lang.Object object2)
copy
in interface LyClass
object1
- Object that receives values of object2.object2
- Object to copy.
LyClass
public java.lang.Object newInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException
newInstance
in interface LyClass
java.lang.InstantiationException
- If an application tries to instantiate an abstract class or
an interface, or if the instantiation fails for some other
reason.
java.lang.IllegalAccessException
- If the class or initializer is not accessible.public LyObject createInstance()
public boolean inheritsFrom(LyClassInfo classInfo)
classInfo
- Checked class info
public boolean isAbstract()
public boolean isVirtual()
public boolean isInherited(LyFieldInfo fieldInfo)
fieldInfo
- Checked field info
public boolean isDerivated(LyFieldInfo fieldInfo)
fieldInfo
- Checked field info
public boolean isTemporary()
public LyClassInfo getSuperClass()
public LyInfoList<LyClassInfo> getSubClasses()
public LyInfoList<LyClassInfo> getSubClasses(boolean godown)
godown
- indicates if the sub-classes are searched recursivly.
public LyObjectSource getObjectSource()
public void clearObjectSourceCache()
getObjectSource()
public java.lang.String getJavaName()
public final java.lang.String getDefaultJavaName()
public java.lang.String checkJavaName(java.lang.String javaName)
public java.lang.String getBehaviorClassName()
public java.lang.Class<?> getBehaviorClass()
public java.lang.reflect.Method getGetMethod(LyFieldInfo fieldInfo)
fieldInfo
- Field info for which the get method is requested.
public java.lang.reflect.Method getSetMethod(LyFieldInfo fieldInfo)
fieldInfo
- Field info for which the set method is requested.
public LyInfoList<LyFieldInfo> getFieldInfos()
public LyInfoList<LyFieldInfo> getIdFieldInfos()
public LyInfoList<LyFieldInfo> getNameFieldInfos()
public LyFieldInfo getFieldInfo(java.lang.String id, boolean exception)
id
- Identifier of the fieldInfoexception
- Boolean indicating if an exception is thrown if not found.
java.lang.IllegalStateException
- if the fieldInfo corresponding to the given id was not found
in this classInfo and if the parameter exception is set to
true.public LyFieldInfo getFieldInfo(java.lang.String id)
id
- Identifier of the fieldInfo
java.lang.IllegalStateException
- if the fieldInfo corresponding to the given id was not found
in this classInfo.getFieldInfo(String, boolean)
public LyInfoList<LyFieldInfo> getFieldInfos(java.util.BitSet marks)
marks
- Requested marks for result fieldInfos.
public LyInfoList<LyFieldInfo> getFieldInfos(int mark)
mark
- Requested mark for result fieldInfos.
public LyInfoList<LyFieldInfo> getFieldInfos(java.util.BitSet marks, boolean matchAll)
marks
- Requested marks, or null for the entire fieldInfo list.matchAll
- Indicates if the fieldIndo must have at least one mark (false) or all of
them (true). Any fieldInfo that match a mark from the mark list is returned
if matchAll is false.
public LyAction getAction(java.lang.String id)
id
- Identifier of the requested action
public LyInfoList<LyAction> getActions(java.util.BitSet marks, boolean matchAll)
marks
- The requested marks.matchAll
- Indicates if the action must have at least one mark ('false') or all of them
('true').
public LyInfoList<LyAction> getActions(int mark, boolean not)
mark
- The requested mark.not
- To invert the search : if this parameter is set to 'true', the searched action
are those that don't have the given mark.
public LyInfoList<LyAction> getActions(int mark)
mark
- The requested mark.
public LyAction getDefaultAction()
public LyAction getActionWithId(java.lang.String actionId)
actionId
- Action identifier that is tested on this class.
public LyInfoList<LyAction> getActionsWithId(java.lang.String actionId)
actionId
- Action identifier that is tested on this class.
public LyAction getRealAction(LyAction action)
action
- Searched action.
public LyClassBinding getBinding()
public LyInfoCache getCachePolicy()
public boolean isLocal()
public final LyClass getPeerClass()
public LySort getSort()
public LyFieldInfo getFieldInfo(int index)
index
- Index of the requested fieldInfo
public int getIndex(LyFieldInfo fieldInfo)
public void resetFieldIndexes()
public boolean contains(LyFieldInfo fieldInfo)
fieldInfo
- Checked fieldInfo.
public LyFieldInfo getRealFieldInfo(LyFieldInfo fieldInfo)
public LyFieldInfo getRealFieldInfo(LyFieldInfo fieldInfo, boolean exception)
public int getFieldInfoCount()
public LyAction getAction(int index)
index
- Index of the searched action.
public int getActionCount()
public LyInfoList<LyAction> getActions()
public boolean contains(LyAction action)
action
- Action that is searched on this classInfo.
public int getRoutesCount()
public LyRoute getRoute(int index)
index
- Index of the searched route.
public LyRoute getRoute(java.lang.String id)
id
- Id of the searched route.
public LyInfoList<LyRoute> getRoutes()
public LyInfoList<LyRoute> getRoutes(LyClassInfo classInfo)
classInfo
- Class info with which routes are searched.
public boolean isNameDifferentOfId()
public boolean isNamePartOfId()
public int getControlCount()
public LyControl getControl(int index)
index
- Index of the searched control.
public LyInfoList<LyControl> getControls()
public LyRule getRule(short index)
index
- Position of the searched rule. If index is negative (-1) return null
public short getRuleCount()
public LyInfoList<LyRule> getRules()
public boolean fromStruct()
public boolean fromArray()
public java.lang.String getTip()
getTip
in class LyObjectInfo
public LyClassInfo getRealClass()
public LyFieldInfo getVirtualFieldInfo(LyFieldInfo fieldInfo)
fieldInfo
- Real field info.
public void setCachePolicy(LyInfoCache cache)
cache
- Informations about the cache policy for this class.public void setCheckFieldInsertion(boolean checkFieldInsertion)
_checkFieldInsertion
parameter.
checkFieldInsertion
- true if we must check the existence of the template when inserting
a field info in current class info, false otherwise.public int getLabelCount()
public LyInfoLabel getLabel(LyInfoLabel.Type type)
public LyInfoLabel getLabel(int index)
public int getUserLabelCount()
public LyInfoLabel[] getLabels()
public LyInfoLabel getUserLabel(int i)
public LyInfoLabel getUserLabel(java.lang.String subType)
public void rehash(java.lang.Object object)
rehash
in interface LyClass
object
- object to rehashpublic void setApplication(LyApplication application)
setApplication
in class LyInfo
application
- The application to which the info belongs.
java.lang.IllegalStateException
- If the info already belongs to an application.public int getNextCount()
public static java.util.BitSet getMarks(java.util.BitSet marks, int parts)
BitSet
public LyInfoList<LyFieldInfo> getfieldInfoFromBinding(java.lang.String binding)
binding
- the binding to search
public java.util.List<LyPeerDataProvider> getPeerDataProviders()
public java.util.BitSet getGenericMarks()
public java.lang.String[] getSpecificMarks()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |