The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
69 views

Should I annotate all the entry points in my library?

In a library project, I see numerous warnings suggesting that I reduce the visibility of public classes and methods. (Or in the case of methods I haven't written tests for, warnings about them being ...
2
votes
1answer
212 views

For Object Oriented Programming purists, are @annotations heresy?

Philosophical Question: An issue that occurred to me is that especially when using frameworks like Spring or Hibernate ( which are everywhere in industry), we have annotate everything. This is ...
0
votes
1answer
281 views

How can attributes/annotations be illustrated on a UML class diagram?

Many programming languages offer a way to annotate types. For instance, in .NET this can be achieved by deriving a custom attribute class from System.Attribute and then annotating another type with ...
1
vote
1answer
181 views

Are decorators/annotations the result of bad design decisions?

Talking generic, there are programming languages who make more or less use of annotations and decorators. Be it to add type information to variables in a dynamically typed language or to add "...
1
vote
2answers
311 views

What are the justifications for annotations in a programming language? [closed]

After spending a great deal of time writing C# and looking at Java, it seems to me that annotations are just an ugly code smell that introduce another conceptual layer that could easily be replaced by ...
2
votes
0answers
69 views

Standard for order of tags in PHP DocBlocks?

Based on the tags listed from this "standard", is there an order of the tags that people typically follow? Even if it's not something that has been entirely accepted, but something proposed? I am ...
1
vote
2answers
153 views

Requirement specifications with annotations? [closed]

I'm curious if there are any templates using annotations such as ambiguous, needs update and so on. Industrial or Academic does not matter. If there are, are there any way tools available that use ...
3
votes
3answers
367 views

“One of some”-type

Say that you have some different classes that does not really have any functionality in common, but somewhere in your program, you need one of them (which one is not necessarily important) because ...
0
votes
2answers
200 views

How to write a new annotation that behaves precisely like an existing one?

Here is my use case. Suppose annotations did have inheritance and would automatically inherit the entire behaviour of the base class. Then I would do the following (note the two package statements): ...
0
votes
1answer
1k views

Where to put JPA annotations? Field, or getter?

version in field: @Column(name = "SAMPLE_STRING") private String sampleString; public String getSampleString(){ return sampleString; } version in getter: private String sampleString; @...
1
vote
2answers
230 views

How to annotate method signature changes?

I'm developing a mini framework and I want to perform changes to existing methods. I know in order to deprecate a method I can use the @deprecated annotation. However, what annotation should I use to ...
19
votes
6answers
2k views

A programming language that allows you to define new limits for simple types

Many languages like C++, C#, and Java allow you to create objects that represent simple types like integer or float. Using a class interface you can override operators and perform logic like checking ...
4
votes
5answers
739 views

What problems are Java annotations well suited to? [closed]

I've been writing in Java and C# for a while, but I'm having a hard time identifying places where using a custom annotation would be advantageous. I can see that JUnit uses annotations in test ...
6
votes
2answers
2k views

What are the benefits vs costs of comment annotation in PHP?

I have just started working with symfony2 and have run across comment annotations. Although comment annotation is not an inherent part of PHP, symfony2 adds support for this feature. My ...
2
votes
1answer
319 views

Java sql annotations ManyToMany relationships

I was wondering your thoughts on the best way to implement a SQL ManyToMany relationship in Java using annotations - in this case eBeans - where there is extra data associated with the join. I have ...
2
votes
1answer
4k views

is it possible to auto-generate annotated POJO from a table

I wonder is it possible or is there a tool to generate annotated POJOs from a table.To make it clear,for example,Person table has fields like ,id,name,surname etc and i wanna to generate a POJO named ...
1
vote
3answers
630 views

Just getting started in Spring and my preference is XML config over annotations. Correct or not?

After having read through some of the Spring docs my inclination is towards using a XML config file rather than annotations on the classes themselves. My reasoning is that by doing so you avoid tying ...
6
votes
1answer
944 views

Why were annotations introduced in Spring and Hibernate?

I would like to know why were annotations introduced in Spring and Hibernate? For earlier versions of both the frameworks book authors were saying that if we keep configuration in xml files then it ...
3
votes
2answers
973 views

What is history and concept of code annotation?

C# and Java has code attribute and code annotation. I don't know about other languages, but I know the code annotation feature is used to expand language itself. I knew what it is, but I want to know ...