コード例 #1
0
ファイル: UnknownInstance.java プロジェクト: robjg/arooa
          public void destroy() throws ArooaConfigurationException {
            fireBeforeDestroy();

            RuntimeConfiguration parentRuntime = parentContext.getRuntime();

            // check it's not the root
            if (parentRuntime != null) {

              int index =
                  parentContext.getConfigurationNode().indexOf(arooaContext.getConfigurationNode());

              if (index < 0) {
                throw new IllegalStateException("Configuration node not added to parent.");
              }

              parentContext.getRuntime().setIndexedProperty(null, index, null);
            }

            fireAfterDestroy();
          }
コード例 #2
0
  PropertyDefinitionImpl(String property, ArooaContext parentContext)
      throws ArooaNoPropertyException, ArooaException {
    this.property = property;
    RuntimeConfiguration parentRuntime = parentContext.getRuntime();

    PropertyAccessor propertyAccessor = parentContext.getSession().getTools().getPropertyAccessor();

    BeanOverview overview = parentRuntime.getClassIdentifier().getBeanOverview(propertyAccessor);

    type = overview.getPropertyType(property);
  }
コード例 #3
0
ファイル: UnknownInstance.java プロジェクト: robjg/arooa
          public void init() throws ArooaConfigurationException {
            firstElementContext.getRuntime().init();

            fireBeforeInit();

            RuntimeConfiguration parentRuntime = parentContext.getRuntime();

            // check it's not the root
            if (parentRuntime != null) {

              int index =
                  parentContext.getConfigurationNode().indexOf(arooaContext.getConfigurationNode());

              if (index < 0) {
                throw new IllegalStateException("Configuration node not added to parent.");
              }

              parentRuntime.setIndexedProperty(null, index, UnknownInstance.this);
            }

            fireAfterInit();
          }