| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Binding
represents an arbitrary Java construct,
and provides a representation-independent means of showing
how a constraint (presumably from an XML Schema, DTD, Relax
schema, etc.) maps to Java. It provides a layer of representation
between the constraint representation and generated Java.
It also allows for uniformity in mapping. For example, the DTD
ELEMENT
and XML Schema element
constructs, while different, should both be mapped to the
same implementation of a Binding
in Zeus. In this
way, constraints that represent semantically equivalent
constructs result in identical sets of bindings.
Method Summary | |
String | getJavaType() This will return the Java type associated with the binding. |
String | getName() This will return the name of the binding. |
void | setJavaType(String javaType) This will set the Java type for this binding. |
void | setName(String name) This will set the name of the binding. |
Method Detail |
public String getJavaType()
This will return the Java type associated with the binding. This will always be the fully qualified name of the Java object, excepting cases where the object is in default included packages.
For example, an object of type org.bby.Foo
would return "org.bby.Foo" when this method is invoked.
However, an object of type java.lang.String
would only return "String." In all cases, the type
returned here is qualified enough to not require
any import statements in generated code.
String
- the Java type of the
binding.public String getName()
This will return the name of the binding. This should be the name of the binding, which is most often a variable name.
For example, for a List
that is associated
with an instance variable named "myList", invoking
getName()
would return "myList." For a
custom object type "Foo", associated with an instance
variable "foo", invoking getName()
would
return "foo".
It's also important to note that there are cases when
this would return null
. For an object that
is top-level, and is not a member variable of any other
object, no name will be associated with the binding.
String
- the name of the binding.public void setJavaType(String javaType)
This will set the Java type for this binding. For
more details on Java types and bindings, see
getJavaType()
.
String
the Java type
for this binding.public void setName(String name)
This will set the name of the binding. For more details
on the name of a binding, see
getName()
.
String
name of the binding.
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |