org.objectweb.jorm.metainfo.lib
Class BasicPrimitiveElement

java.lang.Object
  |
  +--org.objectweb.jorm.metainfo.lib.BasicMetaObject
        |
        +--org.objectweb.jorm.metainfo.lib.BasicTypedElement
              |
              +--org.objectweb.jorm.metainfo.lib.BasicPrimitiveElement
All Implemented Interfaces:
java.lang.Comparable, Loggable, MetaObject, PrimitiveElement, java.io.Serializable, TypedElement
Direct Known Subclasses:
BasicScalarField

public class BasicPrimitiveElement
extends BasicTypedElement
implements PrimitiveElement, Loggable

The BasicPrimitiveElement object is used to define fields which are primitive types. This object is defined by its name, its type, its parent, its size (if used) and a list of mappings for the field.

Author:
X. Spengler
See Also:
Serialized Form

Constructor Summary
BasicPrimitiveElement(java.lang.String name, PType type, int size, MetaObject parent)
          Builds a new PrimitiveElement object.
 
Method Summary
 Logger getLogger()
          Returns a logger to an component that wants to log things.
 LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 boolean isScalar()
          Allows to know if the current Field is a scalar field or not.
 void setLogger(Logger logger)
          Defines a logger object.
 void setLoggerFactory(LoggerFactory loggerFactory)
          Defines the logger factory to obtain new logger.
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicTypedElement
compareTo, getName, getSize, getType
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
getManager, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.PrimitiveElement
getSize
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.TypedElement
getName, getType
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Constructor Detail

BasicPrimitiveElement

public BasicPrimitiveElement(java.lang.String name,
                             PType type,
                             int size,
                             MetaObject parent)
Builds a new PrimitiveElement object. This object is mainly defined by its name, its type and its parent.

Parameters:
name - the name of the primitive field
type - the type of the field (PType object)
parent - the parent of the current object
Method Detail

isScalar

public boolean isScalar()
Allows to know if the current Field is a scalar field or not.

Specified by:
isScalar in interface PrimitiveElement
Returns:
true, if the Field is scalar, else false, if the Field is not scalar

setLogger

public void setLogger(Logger logger)
Defines a logger object.

Specified by:
setLogger in interface Loggable
Parameters:
logger - the logger object

setLoggerFactory

public void setLoggerFactory(LoggerFactory loggerFactory)
Defines the logger factory to obtain new logger.

Specified by:
setLoggerFactory in interface Loggable
Parameters:
loggerFactory - the LoggerFactory object to obtain a logger object

getLogger

public Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.

Specified by:
getLogger in interface Loggable

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.

Specified by:
getLoggerFactory in interface Loggable