Questions tagged [beaninfo]
10 questions
68
votes
8 answers
How to get annotations of a member variable?
I want to know a class's some member variable's annotations , I use BeanInfo beanInfo = Introspector.getBeanInfo(User.class) to introspect a class , and use BeanInfo.getPropertyDescriptors() , to find specific property , and use Class type =…

smallufo
- 11,516
- 20
- 73
- 111
3
votes
2 answers
Differences between BeanInfo:methodDescriptors and class:declaredMethods : multiple methods with same name and method masking
When trying to get JPA annotations at runtime for some properties, I encountered this problem. I can't explain why.
PS: after a debugging session with Spring, I found the explanation of this problem: bridged methods that are introduced at compile…

Guillaume
- 5,488
- 11
- 47
- 83
3
votes
1 answer
JavaBean and relation with BeanInfo, are they related?
Is there any relationship between JavaBean and BeanInfo? I read various posts/questions and about Java Bean it is mentioned a bean is a regular class which adheres to some rule (private data members, getters() , setters(), implements Serializabe…

CuriousMind
- 8,301
- 22
- 65
- 134
2
votes
0 answers
How to modify BeanInfo of a classe (generated by jaxb xjc)?
I created some classes using JAXB XJC. They follow this pattern (some properties with getters and setters and xml annotations):
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "School", propOrder = {
"info",
"students"
})
public class…

Mar
- 21
- 2
1
vote
2 answers
ASM Dynamic Sub Class Creation - NoClassDefFoundError BeanInfo
I am trying to create a sub class dynamically using ASM Framework.
I am able to create the class and instantiate it. But when I try to do
org.apache.commons.beanutils.BeanUtils.copyProperties(processedEntity, entity);
It throws this…

arammal
- 393
- 1
- 4
- 11
1
vote
1 answer
Java - Add custom event Listener to a eventSet in beanInfo with Netbeans
i have a custom bean and a custom eventListener, i need to show my event Listener in the events tab of my bean.
I think the solution is to add my event Listener to a beaninfo(i create it with netbeans, so it is auto-generated).
There is a…

blow
- 12,811
- 24
- 75
- 112
1
vote
1 answer
Java.beans.Introspector.getBeanInfo() fails to assign writeMethods
I made a super simple example that doesn't make any sense.
public static void main(String [] args) throws IntrospectionException {
BeanInfo info = Introspector.getBeanInfo(DemandBidType.class);
int breakpoint = 0;
}
Here's my class:
public…

Basil
- 403
- 5
- 14
0
votes
2 answers
Mock BeanInfo class from Object using mockito
Suppose I have the following method structure:
protected static void sub(Object obj, String filler) {
class cls = obj.getClass();
BeanInfo beanInfo = Introspector.getBeanInfo(cls);
// Other code...
}
How do I mock the BeanInfo class…

Miles Peterson
- 265
- 1
- 4
- 12
0
votes
1 answer
Why doesn't my JavaBean icon display?
I'm using Netbeans 6.7.1 on Windows Vista, I've got a JavaBean component that works as it should and this has an associated BeanInfo class where I've set Icon 32x32 Color property to a 32x32 gif file located on the classpath. I've also set the 16x16…

blank
- 17,852
- 20
- 105
- 159
0
votes
1 answer
How to access private field via BeanInfo in java
I know how to access private fields via Class.forName() and Field[].
Now I am trying samething via BeanInfo Interface.
What I did is below.
get Class instance via Class.forName()
BeanInfo info = Introspector.getBeanInfo(Class) - Here, I can see…

Juneyoung Oh
- 7,318
- 16
- 73
- 121