@Test public void testPService() { PService base = Calculator.kDescriptor; assertThat(base.getProgramName(), is("calculator")); assertThat(base.getName(), is("Calculator")); assertThat(base.getQualifiedName(), is("calculator.Calculator")); assertThat(base.getQualifiedName("calculator"), is("Calculator")); assertThat(base.getExtendsService(), is(nullValue())); PService extended = Calculator2.kDescriptor; assertThat(extended.getMethods(), hasSize(4)); assertThat(extended.getExtendsService(), is(base)); assertThat(extended.getMethod("calculate"), is(notNullValue())); }
public PService(@Nonnull String programName, @Nonnull String name, @Nullable PServiceProvider extendsService, @Nonnull Collection<? extends PServiceMethod> methods) { this.name = name; this.programName = programName; this.extendsService = extendsService; this.methods = methods; }
PService { public PService(@Nonnull String programName, @Nonnull String name, @Nullable PServiceProvider extendsService, @Nonnull Collection<? extends PServiceMethod> methods) { this.name = name; this.programName = programName; this.extendsService = extendsService; this.methods = methods; } }
PService { public PService(@Nonnull String programName, @Nonnull String name, @Nullable PServiceProvider extendsService, @Nonnull Collection<? extends PServiceMethod> methods) { this.name = name; this.programName = programName; this.extendsService = extendsService; this.methods = methods; } PService(@Nonnull String programName,
                    @Nonnull String name,
                    @Nullable PServiceProvider extendsService,
                    @Nonnull Collection<? extends PServiceMethod> methods);  PService(@Nonnull String programName,
                    @Nonnull String name,
                    @Nullable PServiceProvider extendsService,
                    @Nonnull PServiceMethod[] methods); }
PService { public PService(@Nonnull String programName, @Nonnull String name, @Nullable PServiceProvider extendsService, @Nonnull Collection<? extends PServiceMethod> methods) { this.name = name; this.programName = programName; this.extendsService = extendsService; this.methods = methods; } PService(@Nonnull String programName,
                    @Nonnull String name,
                    @Nullable PServiceProvider extendsService,
                    @Nonnull Collection<? extends PServiceMethod> methods);  PService(@Nonnull String programName,
                    @Nonnull String name,
                    @Nullable PServiceProvider extendsService,
                    @Nonnull PServiceMethod[] methods); @Nonnull String getProgramName(); @Nonnull String getName(); @Nonnull String getQualifiedName(String programContext); @Nonnull String getQualifiedName(); @Nullable PService getExtendsService(); @Nonnull Collection<? extends PServiceMethod> getMethods(); @Nullable abstract PServiceMethod getMethod(String name); }
PService { public PService(@Nonnull String programName, @Nonnull String name, @Nullable PServiceProvider extendsService, @Nonnull Collection<? extends PServiceMethod> methods) { this.name = name; this.programName = programName; this.extendsService = extendsService; this.methods = methods; } PService(@Nonnull String programName,
                    @Nonnull String name,
                    @Nullable PServiceProvider extendsService,
                    @Nonnull Collection<? extends PServiceMethod> methods);  PService(@Nonnull String programName,
                    @Nonnull String name,
                    @Nullable PServiceProvider extendsService,
                    @Nonnull PServiceMethod[] methods); @Nonnull String getProgramName(); @Nonnull String getName(); @Nonnull String getQualifiedName(String programContext); @Nonnull String getQualifiedName(); @Nullable PService getExtendsService(); @Nonnull Collection<? extends PServiceMethod> getMethods(); @Nullable abstract PServiceMethod getMethod(String name);  }