package bluej.parser.entity;
import bluej.debugger.gentype.GenTypeExtends;
import bluej.debugger.gentype.GenTypeParameter;
import bluej.debugger.gentype.GenTypeSolid;
import threadchecker.OnThread;
import threadchecker.Tag;
| Represents a "? extends ..." wildcard entity, where the bound has not yet been resolved.
|
*
* @author Davin McCall
*/
public class WildcardExtendsEntity extends TypeArgumentEntity{
private JavaEntity extendsBound;
|
|
public WildcardExtendsEntity(JavaEntity extendsBound)
|
|
{
|
|
this.extendsBound = extendsBound;
|
|
}
|
|
@Override
|
|
@OnThread(Tag.FXPlatform)
|
|
public GenTypeParameter getType()
|
|
{
|
|
TypeEntity ebType = extendsBound.resolveAsType();
|
|
if (ebType != null) {
|
|
GenTypeSolid cbType = ebType.getType().asSolid();
|
|
if (cbType != null) {
|
|
return new GenTypeExtends(cbType);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}