2
votes
0answers
31 views

JSF: auto conversion when backing a view item with an instance of a subclass of a generic class with resolved type parameter

We have a hierarchy of generic "parameter" types, with non-generic concrete leaf classes, a vertical slice of it given here: public interface Parameter<T> public T getValue(); public void ...
2
votes
0answers
60 views

Jersey JSON marshalling of nested generic produces null

Having an issue trying to marshall into JSON a HashMap nested in a List using Jersey 1.11. Here's a snippet of a Jersey endpoint which produces MediaType.APPLICATION_JSON via the returned Response ...
2
votes
0answers
163 views

JAXB Bindings File Sets @XmlElement type to String instead of XMLGregorianCalendar

I'm trying to create an XmlAdapter that takes in an XMLGregorianCalendar and outputs an XMLGregorianCalendar. The purpose is simlply to remove timezone data from the element when unmarshalling data. ...
1
vote
0answers
24 views

Is it possible to fix library parametrized type implementation on the client side to prevent unchecked warning?

I have used JSON library from external provider (google code project) which have a class JSONArray defined this way: public class JSONArray extends ArrayList implements List , ... { So it has a ...
1
vote
0answers
31 views

Netbeans Generics Bug using FEST, Java?

I have the following non-generic method for getting a JListFixture using FEST: public static JListFixture getJListFixtureNonGeneric(final FrameFixture frame) { return frame.list(new ...
1
vote
0answers
24 views

Stop Eclipse from sliding curly braces way to the right for methods returning generic types

I configured Eclipse to adhere to my employer's code style, but one tiny detail isn't working right: I told it to put all braces on the next line, unindented, and line wrap method parameters, aligning ...
1
vote
0answers
65 views

Bidirectional Object-Conversation

I have to process JPA-entity objects to JAXB-annotated objects and vis versa. The two class types look like this: @Entity public Entity{ private String fieldA; private int fieldB; private Entity2 ...
1
vote
0answers
157 views

java generics and .class (Solved)

I have a custom typeHandler for myBatis, defined as @MappedJdbcTypes(JdbcType.VARCHAR) public class JsonTypeHandler<T> extends BaseTypeHandler<T> { ..... } now i need to pass it in ...
1
vote
0answers
112 views

Injecting generic data model with CDI/WELD

I have problem with generics and CDI/WELD on GlassFish 3.1.2. I have these classes: This is abstract bean which holds reference to JPA entity. public abstract class AbstractViewBean<T extends ...
1
vote
0answers
126 views

Circular Generics with Jackson

Using Jackson 2.1.2 (com.fasterxml.jackson packages), I am trying to define a common interface with a @JsonValue on it that may be of a different type than associated subclasses, but have been running ...
1
vote
0answers
166 views

Mockit redefineMethod not working because of interface or generic abstract

I'm trying to figure out why Mockit is not working for the following code: public class TestClass { @Test public void test() { Mockit.redefineMethods(ExecuterClass.class, new Object() ...
1
vote
0answers
231 views

JAXB type Erasure

I'm trying to create java to xsd for a java type that looks like this. public class MainRequest<E extends AParentType<Person>> extends EObject { private Transaction tran; private E e; ...
0
votes
0answers
19 views

Generic return type method: How do I avoid BOTH unchecked cast warnings and the need to cast the return value when calling the method?

I am building out a Selenium automation framework using the Page Object design pattern and I have a method that returns one of three page types. They all extend SecuredPage, which extends Page. I am ...
0
votes
0answers
25 views

generic input <T extends GenParent> with apache cxf in java - spring

Can we have generics as web-method arguments? for eg In interface @WebResult(name = "genericTest") @WebMethod public <T extends GenParent> String testGeneric(T t); and in impl : ...
0
votes
0answers
88 views

Generic sorted singly linked list

I am implementing my own singly linked list for my java class and I thought everything was looking good until I ran the program and it seems to get stuck in an infinite loop in different places each ...

1 2 3 4 5 13
15 30 50 per page