org.apache.polygene.api.injection.scope.Structure.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(129)

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

Structure.<init>介绍

暂无

代码示例

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

class Mixin extends ServerServlet
  {
    @Structure
    private ObjectFactory objectFactory;

    @Override
    protected org.restlet.Application createApplication( Context parentContext )
    {
      return objectFactory.newObject( PolygeneRestApplication.class, parentContext.createChildContext() );
    }
  }
}

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

protected class BoardAdmin
    extends Role<Board>
  {
    @Structure
    Module module;

    public void updateName( String name )
    {
      self().name().set( name );
    }
  }
}

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

protected class ForumView
    extends Role<Forum>
  {
    @Structure
    Module module;

    public Query<Board> boards()
    {
      return module.newQueryBuilder( Board.class ).newQuery( self.boards() );
    }
  }
}

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

protected class ModeratorAdmin
    extends Role<Moderators>
  {
    @Structure
    Module module;

    public void removeModerator()
    {
      self().moderators().remove( moderator.self() );
    }
  }
}

代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.rest-server

class ServiceAvailableConstraint
    implements InteractionConstraint<ServiceAvailable>
  {
    @Structure
    Module module;

    @Override
    public boolean isValid( ServiceAvailable serviceAvailable, ObjectSelection objectSelection )
    {
      ServiceReference ref = module.findService( serviceAvailable.value() );
      return ref != null && ref.isAvailable();
    }
  }
}

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

class ServiceAvailableConstraint
    implements InteractionConstraint<ServiceAvailable>
  {
    @Structure
    Module module;

    @Override
    public boolean isValid( ServiceAvailable serviceAvailable, ObjectSelection objectSelection )
    {
      ServiceReference ref = module.findService( serviceAvailable.value() );
      return ref != null && ref.isAvailable();
    }
  }
}

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

public abstract static class TestMixin1
  implements TestComposite1
{
  @Structure
  Module module;
  public Module getModule()
  {
    return module;
  }
}

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

public abstract static class TestMixin2
  implements TestComposite2
{
  @Structure
  Module module;
  public Module getModule()
  {
    return module;
  }
}

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

public static class ObjectA
{
  @Structure
  TransientBuilderFactory cbf;
  String test()
  {
    CompositeB instance = cbf.newTransient( CompositeB.class );
    return instance.test();
  }
}

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

public ManyConstructorObject( @Structure Module module )
  {
    this.module = module;
  }
}

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

public static class SubContext2
{
  @Structure
  Module module;
  public TestResult genericQuery( TestQuery query )
  {
    return module.newValueFromSerializedState( TestResult.class, "{\"xyz\":\"bar\"}" );
  }
}

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

class Mixin
    implements TestService
  {
    @Structure
    private Module module;
    @Override
    public String hello()
    {
      module.name();
      return "Hello Polygene!";
    }
  }
}

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

public Mixin( @Structure ObjectFactory objectFactory )
{
  converter = new PolygeneConverter( objectFactory );
}

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

public void init( @Structure Module module )
{
  System.out.println( module );
}

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

public Builder( @Structure ValueBuilderFactory vbf )
{
  valueBuilder = vbf.newValueBuilder( PhoneNumber.class );
  prototype = valueBuilder.prototype();
}

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

public Builder( @Structure ValueBuilderFactory vbf )
{
  valueBuilder = vbf.newValueBuilder( PhoneNumber.class );
  prototype = valueBuilder.prototype();
}

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

public ManyConstructorObject( @Uses AnyObject anyObject, @Structure Module module )
{
  this.anyObject = anyObject;
  this.module = module;
}

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

public TimingCaptureConcern( @Structure Module module,
               @Service @Optional MetricsProvider metrics,
               @Invocation Method method
)
{
  super( module, metrics, method );
}

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

public TimingCaptureConcern( @Structure Module module,
               @Service @Optional MetricsProvider metrics,
               @Invocation Method method
)
{
  super( module, metrics, method );
}

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

@SuppressWarnings( "unchecked" )
public SmallCrudRepositoryMixin( @Structure PolygeneAPI api, @This ServiceComposite me )
{
  entityType = api.serviceDescriptorFor( me ).metaInfo( EntityTypeDescriptor.class ).entityType();
}

相关文章

Structure类方法