0

我有一个要导入 RHDM 7.9.0 的 java 类。它会导入,但会显示一条警告消息,指出无法解析该类。导入后,我可以在源视图中查看它,但是当我尝试打开模型视图时,它显示消息“无法解析 Java 文件,无法打开编辑器选项卡,请改用源选项卡。”

这是正常的还是我的 Java 文件有问题?

package com.cdm_testing;

/**
 * This class was automatically generated by the data modeler tool.
 */

public class Address implements java.io.Serializable {

    static final long serialVersionUID = 1L;

    private java.lang.String addressLine1;
    private java.lang.String addressLine2;
    private java.lang.String city;
    private java.lang.String state;
    private java.lang.String zip;
    private java.lang.String county;
    private java.lang.String country;
    private java.lang.String FIPSCountyCode;
    private java.lang.String FIPSStateCode;
    private java.lang.Double latitude;
    private java.lang.Double longitude;

    private java.lang.String addressType;

    private java.lang.Boolean validated;

    public Address() {
    }

    public java.lang.String getAddressLine1() {
        return this.addressLine1;
    }

    public void setAddressLine1(java.lang.String addressLine1) {
        this.addressLine1 = addressLine1;
    }

    public java.lang.String getAddressLine2() {
        return this.addressLine2;
    }

    public void setAddressLine2(java.lang.String addressLine2) {
        this.addressLine2 = addressLine2;
    }

    public java.lang.String getCity() {
        return this.city;
    }

    public void setCity(java.lang.String city) {
        this.city = city;
    }

    public java.lang.String getState() {
        return this.state;
    }

    public void setState(java.lang.String state) {
        this.state = state;
    }

    public java.lang.String getZip() {
        return this.zip;
    }

    public void setZip(java.lang.String zip) {
        this.zip = zip;
    }

    public java.lang.String getCounty() {
        return this.county;
    }

    public void setCounty(java.lang.String county) {
        this.county = county;
    }

    public java.lang.String getCountry() {
        return this.country;
    }

    public void setCountry(java.lang.String country) {
        this.country = country;
    }

    public java.lang.String getFIPSCountyCode() {
        return this.FIPSCountyCode;
    }

    public void setFIPSCountyCode(java.lang.String FIPSCountyCode) {
        this.FIPSCountyCode = FIPSCountyCode;
    }

    public java.lang.String getFIPSStateCode() {
        return this.FIPSStateCode;
    }

    public void setFIPSStateCode(java.lang.String FIPSStateCode) {
        this.FIPSStateCode = FIPSStateCode;
    }

    public java.lang.Double getLatitude() {
        return this.latitude;
    }

    public void setLatitude(java.lang.Double latitude) {
        this.latitude = latitude;
    }

    public java.lang.Double getLongitude() {
        return this.longitude;
    }

    public void setLongitude(java.lang.Double longitude) {
        this.longitude = longitude;
    }

    public java.lang.String getAddressType() {
        return this.addressType;
    }

    public void setAddressType(java.lang.String addressType) {
        this.addressType = addressType;
    }

    public java.lang.Boolean getValidated() {
        return this.validated;
    }

    public void setValidated(java.lang.Boolean validated) {
        this.validated = validated;
    }

    public Address(java.lang.String addressLine1,
            java.lang.String addressLine2, java.lang.String city,
            java.lang.String state, java.lang.String zip,
            java.lang.String county, java.lang.String country,
            java.lang.String FIPSCountyCode, java.lang.String FIPSStateCode,
            java.lang.Double latitude, java.lang.Double longitude,
            java.lang.String addressType, java.lang.Boolean validated) {
        this.addressLine1 = addressLine1;
        this.addressLine2 = addressLine2;
        this.city = city;
        this.state = state;
        this.zip = zip;
        this.county = county;
        this.country = country;
        this.FIPSCountyCode = FIPSCountyCode;
        this.FIPSStateCode = FIPSStateCode;
        this.latitude = latitude;
        this.longitude = longitude;
        this.addressType = addressType;
        this.validated = validated;
    }

}
4

1 回答 1

1

我找到了我的问题的答案。我将类导入到 com.myspace 包中,但类定义将 com.cdm_testing 作为包。一旦我在 Source 视图中更改了包,它就可以在 Model 视图中使用。

于 2020-12-01T19:37:22.963 回答