JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   13.  'Java' Reference
 


13.4 InterfaceField Object

Used on
interface
SuperclassnamedValue
Subclassed By
field
DescriptionA field on a interface.
Inherited
properties
name from namedValue.name

template (base property)

jwpattern (base property)

type from namedValue.type

 13.4.1  Property 'annotation'
 13.4.2  Property 'description'
 13.4.3  Property 'text'
 13.4.4  Property 'default'

13.4.1  Property 'annotation'
DescriptionAn optional list, comma-separated, of Java annotations.
TypeString

13.4.2  Property 'description'
DescriptionOptional description.

Use this to
  1. document the meaning of a particular item
  2. specify functionality at the design stage for implementation later.
TypeString
Support Element Inputstrue

13.4.3  Property 'text'
TypeString
Hiddentrue

13.4.4  Property 'default'
DescriptionSpecifies a default value to which the field will be set when created.

This is an expression which should be compatible with the field's 'type', or the generated program will not compile. For primitive types, this will typically be just the literal value of the default, although it can be an expression. Note that you should just specify the value part for numeric values, not a type-defining suffix. For example, you must specify "0" rather that "0L".

For non-string objects, the default should create an object - e.g. 'new Integer(8)'.

String defaults are assumed to be string literals less the surrounding "". They will have double-quotes added automatically, so the default is a String constant - e.g. Fred goes into the code as "Fred".

You can alter this action, to specify expressions for string defaults, by prefixing the expression with '\', which will be stripped off. You can also start and end the default string value with '"', in which case it will not be altered.

String examples:

input: Fred code: "Fred"

input: \otherfield.substring(1) code: otherfield.substring(1)

input: \"" code: ""

The default expression as processed by the above algorithm can be retrieved via the method getDefaultExpression().
TypeString
 


Copyright (c) 2001-2008 New Technology/enterprise Ltd.