|
|||||
|
|||||
Useful Things |
Language FAQ
Why doesn't the .class reference work?MVEL does not have a special .class identifier to refer to types like Java. Instead you refer to a class reference simply by it's name. For example, if a method accepts type In fact, MVEL treats .class as a regular bean property. So by writing The principle reason for this, is that MVEL has a dynamic type system which treats types as first-class objects, rather than "special" objects like in Java (hence the need for .class). And as such, MVEL allows for class types to be referenced as ordinary variables unlike Java, allowing for type-aliasing. MVEL does not seem to support creation of arrays using the new keyword, how can I create an array?MVEL does not currently support the creation of arrays using the new keyword (ie. new String[5]). This will not apply in MVEL 2.0, which will support regular array creation in the same way as Java. The first method using the simple, inline array syntax like so: For more information on this see Inline List, Maps and Arrays. The second method is to use the Note: that the above syntax is not in error, MVEL does not require that you specify .class to refer to class literals. |
||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||