[
https://issues.jboss.org/browse/FORGE-424?page=com.atlassian.jira.plugin....
]
George Gastaldi updated FORGE-424:
----------------------------------
Fix Version/s: 2.0.0.Alpha3
(was: 2.0.0.Alpha2)
JavaParser does not understand wildcard imports like
"javax.persistence.*"
--------------------------------------------------------------------------
Key: FORGE-424
URL:
https://issues.jboss.org/browse/FORGE-424
Project: Forge
Issue Type: Technical task
Components: Parsers / File Manipulation
Affects Versions: 1.1.0.Final
Reporter: Lincoln Baxter III
Fix For: 2.0.0.Alpha3
The JavaParser Annotation.getQualifiedName() will return "Column" instead of
"javax.persistence.Column" for the following example class scenario. It should
be able to understand the wildcard, given the proper metadata:
{code}package demo.entities;
import javax.persistence.*;
@Entity
public class Contact implements java.io.Serializable {
@Id
private @GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", updatable = false, nullable = false)
Long id = null;
@Version
private @Column(name = "version")
int version = 0;
public Long getId() {
return this.id;
}
public void setId(final Long id) {
this.id = id;
}
public int getVersion() {
return this.version;
}
public void setVersion(final int version) {
this.version = version;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
if (id != null) {
return id.equals(((Contact) that).id);
}
return super.equals(that);
}
@Override
public int hashCode() {
if (id != null) {
return id.hashCode();
}
return super.hashCode();
}
private String name;
public String getName() {
return this.name;
}
public void setName(final String name) {
this.name = name;
}
public String toString() {
return "" + name;
}
}{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira