これは私のコードです(私のクラスのコピーコンストラクターを書き込もうとしています):
public class ArgumentTree<GameArgument, Attack> extends DelegateTree<GameArgument, Attack>
{
public ArgumentTree()
{super();}
public ArgumentTree(ArgumentTree<GameArgument, Attack> sourceTree)
{
super();
Attack atck = new Attack(); // I get the Error here
more code....
}
}
このエラーが発生しています:
unexpected type
required: class
found: type parameter Attack
明確にするために、コードを汎用的にしたくありません。使用する型は GameArgument と Attack のみであることは既にわかっています。また、Attack には独自の適切なデフォルト コンストラクタがあります。