On 2012-11-06 19:42, Max Samukha wrote:

C# allows custom attributes on function parameters, including the return
value. Actually, it allows custom meta-data everywhere. See a use case
here
http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshalasattribute.aspx.

I believe Java does the same.

Yes it does:

http://docs.oracle.com/javase/1.5.0/docs/guide/language/annotations.html

You need to specify the target tough, like declaration of an annotation:

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Test { }

--
/Jacob Carlborg

Reply via email to