Package fr.imag.adele.apam.declarations

Examples of fr.imag.adele.apam.declarations.ImplementationDeclaration


  // save the initial number of instances present in APAM
  int counterInstanceBefore = CST.componentBroker.getInsts().size();

  Instance inst = s1Impl.createInstance(null, null);

  ImplementationDeclaration initialImplDecl = inst.getImpl()
    .getImplDeclaration();

  boolean found = false;

  // save the number of instances present in APAM after the creation of
  // our own instance
  int counterInstanceAfter = CST.componentBroker.getInsts().size();

  for (Instance i : CST.componentBroker.getInsts()) {

      ImplementationDeclaration apamImplDecl = i.getImpl()
        .getImplDeclaration();

      if (apamImplDecl instanceof AtomicImplementationDeclaration
        && initialImplDecl instanceof AtomicImplementationDeclaration) {
    AtomicImplementationDeclaration atomicInitialInstance = (AtomicImplementationDeclaration) apamImplDecl;
View Full Code Here


   * implementation in the Apam model.
   */
  protected ImplementationImpl(CompositeType composite, ApformImplementation apfImpl) throws InvalidConfiguration {
    super(apfImpl);

    ImplementationDeclaration declaration = apfImpl.getDeclaration();

    /*
     * Reference the declared provided specification
     */
    if (declaration.getSpecification() != null) {

      String specificationName = declaration.getSpecification().getName();
      Specification specification = CST.componentBroker.getSpec(specificationName);

      assert specification != null;
      mySpec = specification;

    }

    /*
     * If the implementation does not provides explicitly any specification,
     * we build a dummy specification to allow the resolution algorithm to
     * access the provided resources of this implementation
     */
    if (mySpec == null) {
      mySpec = CST.componentBroker.createSpec(declaration.getName() + "_spec", declaration.getProvidedResources(), (Map<String, String>) null);
    }

    /*
     * Reference the enclosing composite type
     */
 
View Full Code Here

        if (!(getFactory() instanceof ApamAtomicComponentFactory))
            return;

        ApamAtomicComponentFactory implementation = (ApamAtomicComponentFactory) getFactory();
        ImplementationDeclaration declaration = implementation.getApform().getDeclaration();

        if (!(declaration instanceof AtomicImplementationDeclaration))
            return;

        AtomicImplementationDeclaration primitive = (AtomicImplementationDeclaration) declaration;
View Full Code Here

    if (!(getFactory() instanceof ApamAtomicComponentFactory))
      return;

    ApamAtomicComponentFactory implementation = (ApamAtomicComponentFactory) getFactory();
    ImplementationDeclaration declaration = implementation.getDeclaration();

    if (!(declaration instanceof AtomicImplementationDeclaration))
      return;

    AtomicImplementationDeclaration primitive = (AtomicImplementationDeclaration) declaration;
View Full Code Here

    if (!(getFactory() instanceof ApamAtomicComponentFactory))
      return;

    ApamAtomicComponentFactory implementation = (ApamAtomicComponentFactory) getFactory();
    ImplementationDeclaration declaration = implementation.getDeclaration();

    if (!(declaration instanceof AtomicImplementationDeclaration))
      return;

    AtomicImplementationDeclaration primitive = (AtomicImplementationDeclaration) declaration;
View Full Code Here

   
    if (component == null)
      return;
   
    ApamAtomicComponentFactory implementation = (ApamAtomicComponentFactory) getFactory();
    ImplementationDeclaration declaration = implementation.getDeclaration();

    if (!(declaration instanceof AtomicImplementationDeclaration))
      return;

    AtomicImplementationDeclaration primitive = (AtomicImplementationDeclaration) declaration;
View Full Code Here

   
      if (!(getFactory() instanceof ApamAtomicComponentFactory))
        return currentValue;

      ApamAtomicComponentFactory implementation  = (ApamAtomicComponentFactory) getFactory();
      ImplementationDeclaration declaration    = implementation.getDeclaration();
     
      if (! (declaration instanceof AtomicImplementationDeclaration))
        return currentValue;
     
      AtomicImplementationDeclaration primitive  = (AtomicImplementationDeclaration) declaration;
View Full Code Here

      if (!(getFactory() instanceof ApamAtomicComponentFactory))
        return;

      ApamAtomicComponentFactory implementation  = (ApamAtomicComponentFactory) getFactory();
      ImplementationDeclaration declaration  = implementation.getDeclaration();
     
      if (! (declaration instanceof AtomicImplementationDeclaration))
        return;
     
      AtomicImplementationDeclaration primitive  = (AtomicImplementationDeclaration) declaration;
View Full Code Here

                Element componentDescription = new Element(COMPONENT_DECLARATION_PROPERTY, APAM_NAMESPACE);
                componentDescription.addAttribute(new Attribute("name",declaration.getName()));
                componentDescription.addAttribute(new Attribute("type",declaration.getClass().getSimpleName()));

                if (declaration instanceof ImplementationDeclaration) {
                    ImplementationDeclaration implementation = (ImplementationDeclaration) declaration;
                    if (implementation.getSpecification() != null ) {
                        componentDescription.addAttribute(new Attribute("specification",implementation.getSpecification().getName()));
                    }
                }

                if (declaration instanceof CompositeDeclaration) {
                    CompositeDeclaration composite = (CompositeDeclaration) declaration;
View Full Code Here

      sessionId        = Long.toString(System.currentTimeMillis());

      wires.clear();

      ApamAtomicComponentFactory implementation  = (ApamAtomicComponentFactory) getFactory();
      ImplementationDeclaration declaration    = implementation.getDeclaration();
     
      if (! (declaration instanceof AtomicImplementationDeclaration))
        return;
     
      /*
 
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.declarations.ImplementationDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.