Top "Annotations" questions

In programming, annotations are used to add information to a code element which cannot be expressed by the type system.

Need an example of a primary-key @OneToOne mapping in Hibernate

Can somebody please give me an example of a unidirectional @OneToOne primary-key mapping in Hibernate ? I've tried numerous combinations, and …

java hibernate annotations one-to-one
how to specify a bean as non lazy with annotations

Does anyone know how to specify a bean as non lazy when using annotations to configure the bean?

spring annotations spring-annotations
Remove "Method is never used" warning for OnClick annotation in Android Studio

Sorry if this question has been asked before. I am using the Butterknife 5.0 with the latest version of Android Studio(0.5.7). …

methods annotations android-studio warnings butterknife
Using java annotation to inject logger dependency

I am using spring with aspect-j annotation support to allow for an @Loggable annotation. This allows automatic logging on a …

java spring annotations slf4j
codestyle; put javadoc before or after annotation?

I know that it isn't the most vital of issues, but I just realised that I can put the javadoc …

java coding-style annotations javadoc code-documentation
Java - loading annotated classes

I know there are incredible set of tools for loading plugin classes in java, but today an idea came to …

java annotations classloader
How to mix inheritance strategies with JPA annotations and Hibernate?

According to the Hibernate Reference Documentation it should be possible to mix different inheritance mapping strategies when using Hibernate's XML-Metadata: …

hibernate inheritance jpa annotations hierarchy
Writing a java annotation for timing method call

I want to write a java annotation which times the method call. something like this: @TimeIt public int someMethod() { ... } and …

java annotations timing
Trouble getting Hibernate Core and Hibernate Annotations using Apache Ivy (but it's also Maven2 related.)

It's a long one! ;-) There are a lot of copy pasted text in this question which makes it look …

java hibernate maven-2 annotations ivy
Benefits of JavaConfig over XML configurations in Spring?

Earlier the configurations used to be in hard coded in the code, later it was externalized to .property files (for …

spring annotations spring-3 spring-annotations