org.apache.polygene.api.injection.scope.This类的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(205)

本文整理了Java中org.apache.polygene.api.injection.scope.This类的一些代码示例,展示了This类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。This类的具体详情如下:
包路径:org.apache.polygene.api.injection.scope.This
类名称:This

This介绍

暂无

代码示例

代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.testsupport

public static abstract class AnotherValueMixin
  implements AnotherValue
{
  @This
  private AnotherValueInternalState internalState;
  @Override
  public String internalVal()
  {
    return internalState.val2().get();
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static abstract class AnotherValueMixin
  implements AnotherValue
{
  @This
  private AnotherValueInternalState internalState;
  @Override
  public String internalVal()
  {
    return internalState.val2().get();
  }
}

代码示例来源:origin: apache/attic-polygene-java

class Mixin
    implements DestinationAccountRole
  {
    @This
    BalanceData data;
    public void deposit( int amount )
    {
      data.increasedBalance( amount );
    }
  }
}

代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.circuitbreaker

class Mixin
    implements Availability
{
  @This
  Configuration<Enabled> config;
  @This
  ServiceCircuitBreaker circuitBreaker;
  @Override
  public boolean isAvailable()
  {
    return config.get().enabled().get() && circuitBreaker.circuitBreaker().status() == CircuitBreaker.Status.on;
  }
}

代码示例来源:origin: apache/attic-polygene-java

public class EmptyCassandraTableMixin
  implements CanRemoveAll
{
  @This
  private CassandraCluster cluster;

  @Override
  public void removeAll()
  {
    cluster.cassandraClientSession().execute( "TRUNCATE TABLE " + cluster.tableName() + ";");
  }
}

代码示例来源:origin: apache/attic-polygene-java

public abstract class MyServiceMixin
  implements MyService
{
  @This
  Configuration<MyConfig> myconf;
  @Override
  public PersonDetails details()
  {
    return myconf.get().me().get();
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static class TestMixin2
  implements TestService
{
  @This
  Configuration<TestServiceConfiguration> config;
  public String test()
  {
    return "mixin2";
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static class TestMixin
  implements TestService
{
  @This
  Configuration<TestConfiguration> config;
  @Override
  public void test()
  {
    assertThat( config.get().constrained().get(), equalTo( "constrained" ) );
  }
}

代码示例来源:origin: apache/attic-polygene-java

public abstract static class SomeMixin
  implements Some
{
  @This
  private Other other;
  public String method()
  {
    other.other();
    return "method()";
  }
}

代码示例来源:origin: apache/attic-polygene-java

class Mixin
    implements TestActivation
{
  @This
  Configuration<TestConfiguration> config;
  public void printConfig()
  {
    System.out.println( "Activate service:" + config.get().stringConfig().get() );
  }
}

代码示例来源:origin: apache/attic-polygene-java

class Mixin
    implements TestActivation
{
  @This
  Configuration<TestConfiguration> config;
  public void printConfig()
  {
    System.out.println( "Activate service:" + config.get().stringConfig().get() );
  }
}

代码示例来源:origin: apache/attic-polygene-java

public class Mixin
    implements View1
  {
    @This
    FooModel model;

    @Override
    public String bar()
    {
      return model.getBar();
    }
  }
}

代码示例来源:origin: apache/attic-polygene-java

public class Mixin
    implements View2
  {
    @This
    FooModel model;

    @Override
    public String bar()
    {
      return model.getBar();
    }
  }
}

代码示例来源:origin: apache/attic-polygene-java

class Mixin
    implements TestActivation
{
  @This
  Configuration<TestConfiguration> config;
  public void printConfig()
  {
    System.out.println( "Activate service:" + config.get().stringConfig().get() );
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static class InitializationMixin
    implements Initializable
{
  @This
  private SuperType me;
  public void initialize()
  {
    me.greeting().set( "Hello" );
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static abstract class FooServiceMixin
    implements FooServiceComposite
{
  @This
  private Configuration<FooConfigurationComposite> config;
  public String configuredFoo()
  {
    return config.get().foo().get();
  }
}

代码示例来源:origin: apache/attic-polygene-java

public abstract static class TestMixin
  implements TestCase
{
  @This
  TestCase2 testCase2;
  public String sayHello()
  {
    return testCase2.sayHello();
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static class CounterSideEffect
    extends SideEffectOf<Some>
    implements Some
  {
    @This
    Counter counter;

    public String doStuff()
    {
      counter.count().set( counter.count().get() + 1 );
      return null;
    }
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static class HelloWorldMixin
    implements HelloWorld
  {
    @This
    Configuration<HelloWorldConfiguration> config;

    public String sayHello()
    {
      return config.get().phrase() + " " + config.get().name();
    }
  }
}

代码示例来源:origin: apache/attic-polygene-java

public static class MyMixin
    implements My
  {
    @This
    Configuration<MyConfiguration> config;

    @Override
    public String doSomething()
    {
      return config.get().data().get();
    }
  }
}

相关文章