[Java] luxury talk about the future of Java language...

Source: Internet
Author: User

Java is a hard nut to crack. Sun seems to be busy with dividends after winning Microsoft's lawsuit. Compared to the booming. Net World, sun is almost waiting, wasting the feelings of countless open source enthusiasts.
Looking forward to Java 2006, matrix seems to be able to see only the hot blood of Open Source enthusiasts.

What Will Java look like in the future? Below are my expectations:

/***/ /**
* 1. Empty pointer suppression <br>
* JVM-supported runtime empty pointer suppression, marked by [nullable] of the method <br>
* There are too many nullpointer exceptions in Java and complicated detection is often required, which wastes unnecessary tasks.Code.
*/

[Nullable]
Public   Void Testnullable () {
ReturnA. B (). C. D ();//How much code is required to use if else?
}


/***/ /**
* 2. Support for dynamic attributes <br>
* Similar to the implementation of the model, which is supported by the compiler. <Br>
*
@ ParamA: A implements dynamicbean, no C attribute defined
*/

Public   Void Dynamicproperty () {
Assert A ! =   Null ;
A. B. C
=   " ABC " ; // It is equivalent to a. getproperty ("B"). setproperty ("C", "ABC ");
Resultset RS; // For database:
String name = Rs. Name; // If resultset defined getstringproperty (): string name = Rs. getstringproperty ("");
Element order; // For XML, element auto-created in getproperty () method.
Order. Address. Phone =   " 1234 " ; // Order. getproperty ("Address"). setproperty ("phone", "1234 ");
}



/***/ /**
* 3. Support for dynamic methods <br>
* Supported by the compiler. <Br>
*
@ ParamA: A implements dynamicinvoke. The B () method is not defined.
*/

Public   Void Dynamicmethod () {
A. B (
1,"X");//Compiled as a. Invoke ("B", new object [] {1, "x"]);
}


/***/ /**
* 4. Fast reflection <br>
* Supported by the compiler. Easy to check errors during compilation <br>
*
@ ParamA: A defines B () and c variables.
*/

Public   Void Fastreflection () {
Annotation [] Mas
= A. B (). Class . Getannotations (); // A. getclass (). getmethod ("B"). getannotations ();
Annotation [] Mas = A. C. Class . Getannotations (); // A. getclass (). getfield ("C"). getannotations ();
}


/***/ /**
* 5. indexer <br>
* Similar to the. NET indexer, the syntax is concise. Support during compilation <br>
*
@ ParamA: A implements the list interface and map interface.
*/

Public   Void Indexvisit () {
Element order;
// XML Element
Element first = Order [ 0 ]; // Order. Get (0 );
Element address = Order [ " Address " ]; // Order. Get ("Address ")
}


/***/ /**
* 6. AOP <br>
* JVM built-in support for AOP flag <br>
* Trace is a custom attribute. Trace. interceptor specifies the interceptor.
*/

[Trace]
[Role (
" Admin " )] [Transactional]
Public   Void Jvmaop () {

}


/***/ /**
* 7. Conditional compilation <br>
* The Compiler supports the condition flag, which can be used for all elements or even package. <br>
* Used to compile different results during testing and debugging
*/


/***/ /**
* 8. schema and database compilation support <br>
*/

Public   Static   Void Schemasupport () {
[Schema (URL
="File: // test. XSD")]
Document Doc;
Element C
=Doc. A. B. C;//Check during schema Compilation
}


/***/ /**
* 9. built-in object database, supporting memory-like forgetting modes to save space
*/

Public   Void Databasesupport () {
Database.
Default. Find ("");
}

10. It should be supported by the platform and be as smooth as. net.

I hope sun will donate Java to the open source soonCommunity, Like Eclipse.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.