Solved

Java 1.5 metadata annotations and interface generation

Posted on 2004-08-19
5
218 Views
Last Modified: 2010-03-31
This question is about new Java 1.5 new feature metadata annotations.
In this document:  http://java.sun.com/developer/technicalArticles/releases/j2se15 I read the following:

-----------------------

With a metadata processing tool, many repetitive coding steps could be reduced to a concise metadata tag. For example, the remote interface required when accessing a JAX-RPC service implementation could be implemented as follows:

Before

public interface PingIF extends Remote {
      public void ping() throws RemoteException;
  }

  public class Ping implements PingIF {
     public void ping() {
     }
  }


After

public class Ping {
     public @remote void ping() {
     }
  }


--------------------------

Does that mean that Java has the mechanism to automatically create the remote interface when you write "@remote" before a method? I've been looking for the "remote" annotation through the 1.5 API, with no luck. Or it means that Java 1.5 metadata provides you with a mechanism to create a piece of code whose result is that?.
If it's the latter, do you guys know any tool that does that?.
0
Comment
Question by:pulupul
  • 2
  • 2
5 Comments
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 11849400
the annotations can be used by tools, such as apt:
http://java.sun.com/j2se/1.5.0/docs/guide/apt/index.html
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 50 total points
ID: 11850027
JSR 175 states that you could indicate what methods are designed for remote access http://www.jcp.org/en/jsr/detail?id=175. If I were you I would wait for the official release before I can be 100% sure what annotation keywords are supported.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11850234
>>http://java.sun.com/j2se/1.5.0/docs/guide/apt/index.html
 
 

>>
FAQs
Do you know about the Debian Advanced Packaging Tool?
Yes.
>>

ROTFL
0
 
LVL 35

Expert Comment

by:girionis
ID: 11869170
:)
0
 
LVL 92

Expert Comment

by:objects
ID: 11876032
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now