Google engine support for java
7/04/2009Looks like google engine will support java. Pretty exciting
Looks like google engine will support java. Pretty exciting
I’m planning to pass SCJA and SCJP at the end of this year. I will post all the mocks and materials which I find helpful. Here is the first list:
Tutorials/Books
Mocks:
UML
Tutorials/Books
I’ve been using build-in Java annotation types (like @Overrides or @Deprecated) and those created by different vendors/services for a while now but I’ve never built my own. Here is an example of how you can define very simple annotation type and use it:
import java.lang.annotation.Retention; public @interface SimpleMessageAnnotation { public String message(); }
As you can see a declaration of the new annotation type is very similar to the Java interface declaration (add ‘@’ symbol in front of the interface) There are some additional rules you have to follow:
In order to annotate a class with the new type you can write:
@SimpleMessageAnnotation(message = "hello world!!!") public class TestAnnotation { }
Now in order to access the message value during the runtime we can use reflection API. Before we can do that we need to change the RetentionPolicy of our new annotation type to RUNTIME. We can do it by adding Retention annotation to our SimpleMessageAnnotation:
import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Retention(RUNTIME) public @interface SimpleMessageAnnotation { public String message(); }
This will inform the compiler about the new policy. There are 3 policies which can be used by the compiler (default is CLASS):
Now by using reflection API we can access our message value like this:
What can be annotated?
Chris Giametta wrote about how to connect all of the above together.
update:
Christophe Coenraets shows how to use flex with Spring here
Peter Martin describes how to deploy flex on WebSphere here