Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.media.mn8
Class FieldConcept  view FieldConcept download FieldConcept.java

java.lang.Object
  extended byorg.media.mn8.Concept
      extended byorg.media.mn8.JavaConcept
          extended byorg.media.mn8.FieldConcept
All Implemented Interfaces:
FieldDefinition
Direct Known Subclasses:
CameleonJavaAttribute, CameleonJavaElement, DummyFieldConcept, mn8ScriptAttribute, mn8ScriptElement

public class FieldConcept
extends JavaConcept
implements FieldDefinition

Version:
$Revision: 1.11 $ $Date: 2002/06/05 14:55:42 $

Field Summary
protected  java.lang.String _conceptType
           
protected  java.lang.reflect.Field _field
           
protected  Concept _initialValue
           
protected  boolean _isStatic
           
protected  java.lang.String _label
           
protected  java.lang.String _name
           
 
Fields inherited from class org.media.mn8.Concept
_conceptLabel, _isHidden, _resourceURI, _showEmpty
 
Constructor Summary
FieldConcept()
           
FieldConcept(java.lang.String name, java.lang.reflect.Field field, boolean isStatic, java.lang.String label, java.lang.String type, Concept initial)
           
FieldConcept(java.lang.String name, java.lang.reflect.Field field, boolean isStatic, java.lang.String label, java.lang.String type, Concept initial, boolean isHidden)
           
 
Method Summary
 java.lang.Object clone()
          This method may be called to create a new copy of the Object.
 ConceptDefinition getConceptDefinition()
           
(package private)  java.lang.reflect.Field getField()
           
 org.media.mn8.concepts.StringConcept getFieldLabel()
           
 org.media.mn8.concepts.StringConcept getFieldName()
           
 Concept getInitialValue()
           
 java.lang.String getLabel()
           
 java.lang.String getName()
           
 java.lang.String getType()
           
 Concept getValue(Concept on)
           
 boolean isAttribute()
           
 boolean isElement()
           
 boolean isMulti()
           
 boolean isStatic()
           
 Concept newInstance()
           
 void setValue(Concept on, Concept value)
           
 org.media.mn8.concepts.StringConcept toTXT()
           
 org.media.mn8.concepts.StringConcept toXML()
           
 
Methods inherited from class org.media.mn8.JavaConcept
create, equals, equals, opEQ
 
Methods inherited from class org.media.mn8.Concept
areThereMoreElemenents, cloneConcept, extendsConcept, getAllInheritedConcepts, getAttributeValue, getConceptAttribute, getConceptAttribute, getConceptAttributeField, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptInstance, getConceptLabel, getConceptMethod, getConceptMethods, getConceptNamed, getConceptOperators, getConceptsAtPath, getConceptsAtPath, getConceptType, getErrorHandler, getInheritedConcepts, getMeAllElements, getResourceURI, hasConceptAttribute, hasConceptAttribute, hasConceptElement, hasConceptElement, hasConceptMethod, hasPath, hasPath, isHidden, loadContent, printFields, printFields, searchDeeperForPath, searchSubElements, setConceptLabel, setErrorHandler, setHidden, setResourceURI, setShowEmpty, showEmpty, subAttributeGetConcept, subAttributeHasPath, subElementGetConcepts, subElementHasPath
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected java.lang.String _name

_isStatic

protected boolean _isStatic

_label

protected java.lang.String _label

_conceptType

protected java.lang.String _conceptType

_initialValue

protected Concept _initialValue

_field

protected java.lang.reflect.Field _field
Constructor Detail

FieldConcept

public FieldConcept()

FieldConcept

public FieldConcept(java.lang.String name,
                    java.lang.reflect.Field field,
                    boolean isStatic,
                    java.lang.String label,
                    java.lang.String type,
                    Concept initial)

FieldConcept

public FieldConcept(java.lang.String name,
                    java.lang.reflect.Field field,
                    boolean isStatic,
                    java.lang.String label,
                    java.lang.String type,
                    Concept initial,
                    boolean isHidden)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface FieldDefinition

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface FieldDefinition

isStatic

public boolean isStatic()
Specified by:
isStatic in interface FieldDefinition

getType

public java.lang.String getType()
Specified by:
getType in interface FieldDefinition

newInstance

public Concept newInstance()
Specified by:
newInstance in interface FieldDefinition

toXML

public org.media.mn8.concepts.StringConcept toXML()
Overrides:
toXML in class JavaConcept

isMulti

public boolean isMulti()

toTXT

public org.media.mn8.concepts.StringConcept toTXT()
Overrides:
toTXT in class JavaConcept

isAttribute

public boolean isAttribute()
Specified by:
isAttribute in interface FieldDefinition

isElement

public boolean isElement()
Specified by:
isElement in interface FieldDefinition

getInitialValue

public Concept getInitialValue()
Specified by:
getInitialValue in interface FieldDefinition

getValue

public Concept getValue(Concept on)
Specified by:
getValue in interface FieldDefinition

setValue

public void setValue(Concept on,
                     Concept value)
Specified by:
setValue in interface FieldDefinition

getFieldName

public org.media.mn8.concepts.StringConcept getFieldName()

getFieldLabel

public org.media.mn8.concepts.StringConcept getFieldLabel()

getConceptDefinition

public ConceptDefinition getConceptDefinition()
Overrides:
getConceptDefinition in class JavaConcept

getField

java.lang.reflect.Field getField()

clone

public java.lang.Object clone()
Description copied from class: java.lang.Object
This method may be called to create a new copy of the Object. The typical behavior is as follows:
  • o == o.clone() is false
  • o.getClass() == o.clone().getClass() is true
  • o.equals(o) is true

However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>Object.equals(Object) 55 .

If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.

Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.

All array types implement Cloneable, and override this method as follows (it should never fail):

 public Object clone()
 {
   try
     {
       super.clone();
     }
   catch (CloneNotSupportedException e)
     {
       throw new InternalError(e.getMessage());
     }
 }
 

Overrides:
clone in class JavaConcept