I have seen the following pattern used in several frameworks, where a private method is wrapped in a public method:
public Object method_public()
{
return method_private();
}
private Object method_private()
{
return Object;
}
What is this pattern called and when should it be used?
Looks like Delegation pattern
. But in very strange manner.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.