0

在以下代码中,我将类 T 作为通用“参数”,并且需要在其中一种方法中返回类似“T.class”的内容。我该怎么做?

public abstract class GenericLogPartitioner<K, V, T extends FileInputFormat<K, V>> extends LogPartitioner {



    @Override
    protected Class<? extends FileInputFormat> getInputFormatClass() {
        return T.getClass(); //what should be here. I need to return T
    }
4

0 回答 0