package foundation.handler;
|
|
import foundation.json.IJSONProvider;
|
import foundation.json.IJSONWriter;
|
import foundation.preload.Bucket;
|
|
public class SystemMethodBucket extends Bucket<MethodMeta> implements IJSONProvider {
|
private static SystemMethodBucket instance;
|
|
static {
|
instance = newInstance();
|
}
|
|
private SystemMethodBucket() {
|
|
}
|
|
public static synchronized SystemMethodBucket getInstance() {
|
if (instance == null) {
|
instance = new SystemMethodBucket();
|
}
|
|
return instance;
|
}
|
|
public static SystemMethodBucket newInstance() {
|
return new SystemMethodBucket();
|
}
|
|
@Override
|
public void writeJSON(IJSONWriter writer) {
|
writer.beginArray("actions");
|
|
for (MethodMeta meta : this) {
|
writer.beginObject();
|
meta.writeJSONBody(writer);
|
writer.endObject();
|
}
|
|
writer.endArray();
|
}
|
|
|
}
|