Top "Annotations" questions

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

Telling IntelliJ IDEA which methods not to identify as unused

IntelliJ IDEA has a handy feature to detect unused methods and show them in grey, hinting a potential warning for …

java spring annotations intellij-idea aop
Adding an annotation to a runtime generated method/class using Javassist

I'm using Javassist to generate a class foo, with method bar, but I can't seem to find a way to …

java annotations javassist
@Override annotation error (android prefs)

When I was trying to use this code to enable preferences into my app import android.app.Activity; import android.…

android annotations overriding android-preferences
Syntax error, annotations are only available if source level is 5.0 - AspectJ in Maven

I am trying to use the aspectj-maven-plugin in a maven project. At compile time, I get: Syntax error, annotations are …

java annotations aspectj
Hibernate, Postgresql: Column "x" is of type oid but expression is of type byte

I have a strange problem regarding the hibernate mapping containing large objects (BLOB), when switching between different databases. @Lob private …

hibernate postgresql annotations bytearray oid
Is there an idiom in Java for empty methods which exist to satisfy an interface?

Let's say I have a class Foo implementing an interface such as MouseListener. The MouseListener interface consists of five methods …

java interface annotations oop idioms
Create PDF Annotations in iOS

I've been working on a pdf viewer with support for annotations and I need to be able to save new …

objective-c ios pdf annotations quartz-2d
Spring 3 @Component and static factory method

If I'm writing a static factory method to create objects, how do I use the '@Component' annotation for that …

java spring annotations static-factory
Annotation based ServiceLocatorFactoryBean?

I would like to implement Factory pattern in my project..i have gone through online resources and I came to …

java spring spring-mvc annotations factory-pattern
Spring inject without autowire annotation

I find some answer: https://stackoverflow.com/a/21218921/2754014 about Dependency Injection. There isn't any annotation like @Autowired, @Inject or @Resource. …

java spring dependency-injection annotations autowired