664 |
implements ResolvedImport |
implements ResolvedImport |
665 |
{ |
{ |
666 |
private String importSpecifier; |
private String importSpecifier; |
667 |
|
private String name; |
668 |
|
|
669 |
ResolvedImportNotFound(String importSpecifier) |
ResolvedImportNotFound(String importSpecifier) |
670 |
{ |
{ |
671 |
this.importSpecifier = importSpecifier; |
this.importSpecifier = importSpecifier; |
672 |
|
int ndx = importSpecifier.lastIndexOf('.'); |
673 |
|
if (ndx >= 0) { |
674 |
|
this.name = importSpecifier.substring(ndx + 1); |
675 |
|
} |
676 |
|
else { |
677 |
|
this.name = importSpecifier; |
678 |
|
} |
679 |
} |
} |
680 |
|
|
681 |
public String toString() |
public String toString() |
685 |
|
|
686 |
public String match(String name) |
public String match(String name) |
687 |
{ |
{ |
688 |
return null; // FIXME! |
if (name.equals(this.name)) |
689 |
|
return this.name; |
690 |
|
// FIXME: note that we don't handle on-demand imports here. |
691 |
|
return null; |
692 |
} |
} |
693 |
|
|
694 |
public boolean mismatch(String name) |
public boolean mismatch(String name) |