overriding methods without subclassing in Java

前端 未结 5 1923
时光取名叫无心
时光取名叫无心 2021-01-02 05:41

I started on a new project recently and saw the usage of overriding like below for the first time.

public class SomeClass {
  public void myMethod() {
    XS         


        
5条回答
  •  被撕碎了的回忆
    2021-01-02 06:08

    The new implementation for

    wrapMapper(MapperWrapper next)

    method is limited for this instance xstream

    XStream xstream

    this type of overriding is creating a class that extends XStream, that's why it is called Anonymous, do not have a name and you can not have a reference for it.

提交回复
热议问题