Lincoln Baxter III created FORGE-922:
----------------------------------------
Summary: Forge JavaParser does not support Wildcard Imports
"org.jboss.forge.*"
Key: FORGE-922
URL:
https://issues.jboss.org/browse/FORGE-922
Project: Forge
Issue Type: Enhancement
Components: Parsers / File Manipulation
Reporter: Lincoln Baxter III
Fix For: 2.0.0.Alpha5
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