Commits

Michael Ludwig  committed a6a3f20

Simplify maven structure once more to a single module. Remove Janino runtime proxying because APT does everything we need to

  • Participants
  • Parent commits a4c6604

Comments (0)

Files changed (266)

 ## Release Notes
 
 ### 1.7.0
-* Drastically simplify `Component` definition by using interfaces, APT, and Janino.
+* Drastically simplify `Component` definition by using interfaces and APT.
 * Remove `IndexedDataStore` to consolidate property package.
 * Make `Component`, `Entity` and `EntitySystem` interfaces and hide their implementations
   in an impl package.
 * Remove `ComponentData`. Types now extend `Component` directly as sub-interfaces. The
   onSet() method has also been removed, but the same functionality can be used with the
   `@SharedInstance` annotation.
-* Component definitions are now either generated at build time using an annotation
-  processor, or at runtime using Janino if an existing class can't be located.
-* Restructure Maven modules to support integration tests.
+* Component proxy implementations generated at build time using an annotation
+  processor.
 
 ### 1.6.1
 * Remove `Entity.getIfModified()` method because its semantics were vague and unhelpful.

File entreri-apt-tests/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>entreri-apt-tests</artifactId>
-    <packaging>jar</packaging>
-
-    <name>Unit tests for Entreri using APT</name>
-
-    <parent>
-        <groupId>com.lhkbob.entreri</groupId>
-        <artifactId>entreri</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
-        <relativePath>..</relativePath>
-    </parent>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-invoker-plugin</artifactId>
-                <version>1.8</version>
-
-                <configuration>
-                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
-                    <settingsFile>${project.basedir}/src/it/settings.xml</settingsFile>
-                    <localRepositoryPath>${project.build.directory}/local-repo
-                    </localRepositoryPath>
-                    <addTestClassPath>true</addTestClassPath>
-                    <postBuildHookScript>verify</postBuildHookScript>
-                    <cloneClean>true</cloneClean>
-                    <addTestClassPath>true</addTestClassPath>
-                </configuration>
-
-                <executions>
-                    <execution>
-                        <id>integration-test</id>
-                        <phase>integration-test</phase>
-                        <goals>
-                            <goal>install</goal>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.parent.groupId}</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/InvalidFactoryComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/InvalidFactoryComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-InvalidFactoryComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>InvalidFactoryComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/InvalidFactoryComponent/src/main/java/InvalidFactoryComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-import com.lhkbob.entreri.property.Factory;
-
-/**
- * A test component that mis-configures a component so that the property factory has the
- * incorrect type.
- *
- * @author Michael Ludwig
- */
-public interface InvalidFactoryComponent extends Component {
-    public void setValue(int v);
-
-    @Factory(FloatPropertyFactory.class)
-    public int getValue();
-}

File entreri-apt-tests/src/it/InvalidFactoryComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/InvalidPropertyComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/InvalidPropertyComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-InvalidPropertyComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>InvalidPropertyComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/InvalidPropertyComponent/src/main/java/InvalidPropertyComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-
-/**
- * Test component that uses the invalid property type NoFactoryProperty.
- */
-public interface InvalidPropertyComponent extends Component {
-    public NoFactoryProperty.Crass getCrass();
-
-    public void setCrass(NoFactoryProperty.Crass value);
-}

File entreri-apt-tests/src/it/InvalidPropertyComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/InvalidSharedObjectComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/InvalidSharedObjectComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-InvalidSharedObjectComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>InvalidSharedObjectComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/InvalidSharedObjectComponent/src/main/java/InvalidSharedObjectComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-import com.lhkbob.entreri.property.SharedInstance;
-
-/**
- * Invalid component definition that double checks that we fail when using a shared
- * instance annotation with a object properties.
- */
-public interface InvalidSharedObjectComponent extends Component {
-    @SharedInstance
-    public Object getValue();
-
-    public void setValue(Object v);
-}

File entreri-apt-tests/src/it/InvalidSharedObjectComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/InvalidSharedPrimitiveComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/InvalidSharedPrimitiveComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-InvalidSharedPrimitiveComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>InvalidSharedPrimitiveComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/InvalidSharedPrimitiveComponent/src/main/java/InvalidSharedPrimitiveComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-import com.lhkbob.entreri.property.SharedInstance;
-
-/**
- * Invalid component type that tries to have a shared instance from a property that
- * doesn't support it. Note that this failure also extends to any other property type that
- * isn't ObjectProperty that doesn't implement ShareableProperty.
- */
-public interface InvalidSharedPrimitiveComponent extends Component {
-    @SharedInstance
-    public int getSharedValue();
-
-    public void setSharedValue(int v);
-}

File entreri-apt-tests/src/it/InvalidSharedPrimitiveComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/MismatchedNameComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/MismatchedNameComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-MismatchedNameComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>MismatchedNameComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/MismatchedNameComponent/src/main/java/MismatchedNameComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-import com.lhkbob.entreri.property.Named;
-
-/**
- * A component type that uses mismatched Named annotations to break an otherwise valid
- * definition.
- */
-public interface MismatchedNameComponent extends Component {
-    @Named("right")
-    public void setValue(int f);
-
-    @Named("left")
-    public int getValue();
-}

File entreri-apt-tests/src/it/MismatchedNameComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/MismatchedTypeComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/MismatchedTypeComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-MismatchedTypeComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>MismatchedTypeComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/MismatchedTypeComponent/src/main/java/MismatchedTypeComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-
-/**
- * A component where the setter and getter types don't match for a property.
- */
-public interface MismatchedTypeComponent extends Component {
-    public int getValue();
-
-    public void setValue(float f);
-}

File entreri-apt-tests/src/it/MismatchedTypeComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/MissingGetterComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/MissingGetterComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-MissingGetterComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>MissingGetterComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/MissingGetterComponent/src/main/java/MissingGetterComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-
-/**
- * A test component that has a mismatched property definition by missing a getter for the
- * setter.
- *
- * @author Michael Ludwig
- */
-public interface MissingGetterComponent extends Component {
-    public void setValue(int v);
-}

File entreri-apt-tests/src/it/MissingGetterComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/MissingPropertyGetComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/MissingPropertyGetComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-MissingPropertyGetComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>MissingPropertyGetComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/MissingPropertyGetComponent/src/main/java/MissingPropertyGetComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-import com.lhkbob.entreri.property.Factory;
-import com.lhkbob.entreri.property.Property;
-import com.lhkbob.entreri.property.PropertyFactory;
-
-/**
- * Invalid component type because it references a property type that doesn't have the
- * expected get method.
- */
-public interface MissingPropertyGetComponent extends Component {
-    @Factory(MissingGetterFactory.class)
-    public Object getValue();
-
-    public void setValue(Object o);
-
-    public static class MissingGetterProperty implements Property {
-        public void set(int index, Object o) {
-
-        }
-
-        // we don't really have to implement these because the component
-        // will fail validation
-        @Override
-        public void setCapacity(int size) {
-        }
-
-        @Override
-        public int getCapacity() {
-            return 0;
-        }
-
-        @Override
-        public void swap(int indexA, int indexB) {
-        }
-    }
-
-    public static class MissingGetterFactory
-            implements PropertyFactory<MissingGetterProperty> {
-        @Override
-        public MissingGetterProperty create() {
-            return new MissingGetterProperty();
-        }
-
-        @Override
-        public void setDefaultValue(MissingGetterProperty property, int index) {
-        }
-
-        @Override
-        public void clone(MissingGetterProperty src, int srcIndex,
-                          MissingGetterProperty dst, int dstIndex) {
-        }
-    }
-}

File entreri-apt-tests/src/it/MissingPropertyGetComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/MissingPropertySetComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/MissingPropertySetComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-MissingPropertySetComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>MissingPropertySetComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/MissingPropertySetComponent/src/main/java/MissingPropertySetComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-import com.lhkbob.entreri.property.Factory;
-import com.lhkbob.entreri.property.Property;
-import com.lhkbob.entreri.property.PropertyFactory;
-
-/**
- * Invalid component type because it references a property type that doesn't have the
- * expected set method.
- */
-public interface MissingPropertySetComponent extends Component {
-    @Factory(MissingSetterFactory.class)
-    public Object getValue();
-
-    public void setValue(Object o);
-
-    public static class MissingSetterProperty implements Property {
-        public Object get(int index) {
-            return null;
-        }
-
-        // we don't really have to implement these because the component
-        // will fail validation
-        @Override
-        public void setCapacity(int size) {
-        }
-
-        @Override
-        public int getCapacity() {
-            return 0;
-        }
-
-        @Override
-        public void swap(int indexA, int indexB) {
-        }
-    }
-
-    public static class MissingSetterFactory
-            implements PropertyFactory<MissingSetterProperty> {
-        @Override
-        public MissingSetterProperty create() {
-            return new MissingSetterProperty();
-        }
-
-        @Override
-        public void setDefaultValue(MissingSetterProperty property, int index) {
-        }
-
-        @Override
-        public void clone(MissingSetterProperty src, int srcIndex,
-                          MissingSetterProperty dst, int dstIndex) {
-        }
-    }
-}

File entreri-apt-tests/src/it/MissingPropertySetComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/MissingSetterComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/MissingSetterComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-MissingSetterComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>MissingSetterComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/MissingSetterComponent/src/main/java/MissingSetterComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-
-/**
- * A test component that has a mismatched property definition by missing a setter for the
- * getter.
- *
- * @author Michael Ludwig
- */
-public interface MissingSetterComponent extends Component {
-    public int getValue();
-}

File entreri-apt-tests/src/it/MissingSetterComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/NonBeanComponent/invoker.properties

-invoker.buildResult = failure

File entreri-apt-tests/src/it/NonBeanComponent/pom.xml

-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>test</groupId>
-    <artifactId>entreri-apt-tests-NonBeanComponent</artifactId>
-    <version>1</version>
-    <packaging>jar</packaging>
-
-    <name>NonBeanComponent build failure test</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-core</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-
-        <dependency>
-            <groupId>@project.groupId@</groupId>
-            <artifactId>entreri-apt-tests</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
-</project>

File entreri-apt-tests/src/it/NonBeanComponent/src/main/java/NonBeanComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-
-/**
- * Test component that declares a method that doesn't follow the bean conventions and is
- * thus invalid.
- */
-public interface NonBeanComponent extends Component {
-    public void thisCantPossiblyBeABeanMethod();
-}

File entreri-apt-tests/src/it/NonBeanComponent/verify.bsh

-import com.lhkbob.entreri.InvokerUtils;
-import java.io.*;
-
-try {
-    return InvokerUtils.validateLog(basedir);
-} catch(IOException e) {
-    e.printStackTrace();
-    return false;
-}

File entreri-apt-tests/src/it/settings.xml

-<?xml version="1.0"?>
-<settings>
-    <profiles>
-        <profile>
-            <id>it-repo</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <repositories>
-                <repository>
-                    <id>local.central</id>
-                    <url>@localRepositoryUrl@</url>
-                    <releases>
-                        <enabled>true</enabled>
-                    </releases>
-                    <snapshots>
-                        <enabled>true</enabled>
-                    </snapshots>
-                </repository>
-            </repositories>
-            <pluginRepositories>
-                <pluginRepository>
-                    <id>local.central</id>
-                    <url>@localRepositoryUrl@</url>
-                    <releases>
-                        <enabled>true</enabled>
-                    </releases>
-                    <snapshots>
-                        <enabled>true</enabled>
-                    </snapshots>
-                </pluginRepository>
-            </pluginRepositories>
-        </profile>
-    </profiles>
-</settings>

File entreri-apt-tests/src/main/java/com.lhkbob.entreri.components/ComplexComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.property.Factory;
-import com.lhkbob.entreri.property.IntProperty.DefaultInt;
-import com.lhkbob.entreri.property.LongProperty.DefaultLong;
-import com.lhkbob.entreri.property.Named;
-import com.lhkbob.entreri.property.SharedInstance;
-
-/**
- * A Component that tests a variety of things: multiple properties, different types,
- * customized default values, an overridden property factory, named properties, and
- * multi-parameter methods, extending component types, auto-detected properties, sharable
- * instances.
- *
- * @author Michael Ludwig
- */
-public interface ComplexComponent extends IntComponent, FloatComponent {
-    public void setLong(long i);
-
-    @DefaultLong(Long.MAX_VALUE)
-    public long getLong();
-
-    public void setFactoryFloat(float f);
-
-    @Factory(FloatPropertyFactory.class)
-    public float getFactoryFloat();
-
-    public short getParam1();
-
-    public short getParam2();
-
-    public ComplexComponent setParams(@Named("param1") short p1,
-                                      @Named("param2") short p2);
-
-    @Named("foo-blah")
-    public boolean isNamedParamGetter();
-
-    @Named("foo-blah")
-    public ComplexComponent setNamedParamSetter(boolean foo);
-
-    @DefaultInt(14)
-    @SharedInstance
-    public CustomProperty.Bletch hasBletch();
-
-    public void setBletch(CustomProperty.Bletch b);
-}

File entreri-apt-tests/src/main/java/com.lhkbob.entreri.components/CustomProperty.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.property.*;
-
-@Factory(CustomProperty.CustomFactoryWithAttributes.class)
-public class CustomProperty implements ShareableProperty<CustomProperty.Bletch> {
-    private final ObjectProperty property;
-
-    public CustomProperty() {
-        property = new ObjectProperty();
-    }
-
-    @Override
-    public Bletch createShareableInstance() {
-        return new Bletch();
-    }
-
-    public void set(int index, Bletch b) {
-        get(index).value = b.value;
-    }
-
-    public Bletch get(int index) {
-        return (Bletch) property.get(index);
-    }
-
-    @Override
-    public void get(int index, Bletch b) {
-        b.value = get(index).value;
-    }
-
-    @Override
-    public void setCapacity(int size) {
-        property.setCapacity(size);
-    }
-
-    @Override
-    public int getCapacity() {
-        return property.getCapacity();
-    }
-
-    @Override
-    public void swap(int indexA, int indexB) {
-        property.swap(indexA, indexB);
-    }
-
-    public static class CustomFactoryWithAttributes
-            implements PropertyFactory<CustomProperty> {
-        private final Attributes attributes;
-
-        public CustomFactoryWithAttributes(Attributes attrs) {
-            attributes = attrs;
-        }
-
-        @Override
-        public CustomProperty create() {
-            return new CustomProperty();
-        }
-
-        @Override
-        public void setDefaultValue(CustomProperty property, int index) {
-            Bletch b = new Bletch();
-            b.value = (!attributes.hasAttribute(IntProperty.DefaultInt.class) ? 0
-                                                                              : attributes
-                               .getAttribute(IntProperty.DefaultInt.class).value());
-            property.property.set(index, b);
-        }
-
-        @Override
-        public void clone(CustomProperty src, int srcIndex, CustomProperty dst,
-                          int dstIndex) {
-            // don't care about clone policy for the tests, but make it consistent
-            // with value behavior for shareable property
-            src.get(srcIndex, dst.get(dstIndex));
-        }
-    }
-
-    public static class Bletch {
-        public int value;
-    }
-}

File entreri-apt-tests/src/main/java/com.lhkbob.entreri.components/FloatComponent.java

-/*
- * Entreri, an entity-component framework in Java
- *
- * Copyright (c) 2013, Michael Ludwig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- *     Redistributions of source code must retain the above copyright notice,
- *         this list of conditions and the following disclaimer.
- *     Redistributions in binary form must reproduce the above copyright notice,
- *         this list of conditions and the following disclaimer in the
- *         documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.lhkbob.entreri.components;
-
-import com.lhkbob.entreri.Component;
-
-/**
- * A test component that tests the float primitive type.
- *
- * @author Michael Ludwig
- */
-public interface FloatComponent extends Component {
-    public float getFloat();
-
-    public void setFloat(float value);
-}

File entreri-apt-tests/src/main/java/com.lhkbob.entreri.components/FloatPropertyFactory.java

-/*
- * Entreri, an entity-compone