001/* 002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. 003 * Copyright (C) 2000-2011 The Gridarta Developers. 004 * 005 * This program is free software; you can redistribute it and/or modify 006 * it under the terms of the GNU General Public License as published by 007 * the Free Software Foundation; either version 2 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License along 016 * with this program; if not, write to the Free Software Foundation, Inc., 017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 018 */ 019 020package net.sf.gridarta.model.archetype; 021 022import net.sf.gridarta.model.anim.AnimationObjects; 023import net.sf.gridarta.model.face.FaceObjectProviders; 024import net.sf.gridarta.model.gameobject.TestGameObject; 025import net.sf.gridarta.model.maparchobject.TestMapArchObject; 026import org.jetbrains.annotations.NotNull; 027 028/** 029 * An undefined {@link Archetype} implementation for testing purposes. 030 * @author Andreas Kirschbaum 031 */ 032public class TestUndefinedArchetype extends AbstractArchetype<TestGameObject, TestMapArchObject, TestArchetype> implements TestArchetype { 033 034 /** 035 * The serial version UID. 036 */ 037 private static final long serialVersionUID = 1L; 038 039 /** 040 * Creates a new instance. 041 * @param archetypeName the name of the archetype 042 * @param faceObjectProviders the face object providers for looking up 043 * faces 044 * @param animationObjects the animation objects for looking up animations 045 */ 046 public TestUndefinedArchetype(@NotNull final String archetypeName, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects) { 047 super(archetypeName, faceObjectProviders, animationObjects); 048 } 049 050 /** 051 * {@inheritDoc} 052 */ 053 @NotNull 054 @Override 055 protected TestArchetype getThis() { 056 return this; 057 } 058 059 /** 060 * {@inheritDoc} 061 */ 062 @Override 063 public void setUsesDirection(final boolean usesDirection) { 064 throw new UnsupportedOperationException(); 065 } 066 067 /** 068 * {@inheritDoc} 069 */ 070 @Override 071 public boolean isUndefinedArchetype() { 072 return true; 073 } 074 075 /** 076 * {@inheritDoc} 077 */ 078 @Override 079 public boolean usesDirection() { 080 return false; 081 } 082 083 /** 084 * {@inheritDoc} 085 */ 086 @NotNull 087 @Override 088 public TestArchetype clone() { 089 return super.clone(); 090 } 091 092}