Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimplePlugin/SoLibPlugin声明为abstract的目的不太明确 #10

Open
Tyeeee opened this issue Jan 6, 2017 · 1 comment
Open

SimplePlugin/SoLibPlugin声明为abstract的目的不太明确 #10

Tyeeee opened this issue Jan 6, 2017 · 1 comment

Comments

@Tyeeee
Copy link

Tyeeee commented Jan 6, 2017

如果不想被创建对象的话似乎可以私有构造函数,但我看了构造函数是public,是否需要更正去掉abstract?

@Tyeeee
Copy link
Author

Tyeeee commented Jan 6, 2017

@workerthread
public abstract B createBehavior(Context context) throws Exception;

是不是这才是你的想要在Plugin类中定义的,和创建对象没什么关系。

不过你现在写了个默认实现
@workerthread
public B createBehavior(Context context) throws Exception {
return null;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant