001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.acme.bar; 018 019 import java.util.List; 020 import java.util.ArrayList; 021 022 /** 023 * @version $Revision: 469417 $ $Date: 2006-10-31 03:50:58 -0500 (Tue, 31 Oct 2006) $ 024 */ 025 @Type public class FullyAnnotated<Cheese extends java.util.Stack,Fun extends java.util.Iterator<java.lang.Exception>,Beeer> { 026 @Field private String field; 027 @Field private char[] characters; 028 @Field private String[] strings; 029 @Field private String[][] moreStrings; 030 @Field private List<String> stringList; 031 @Field private Cheese spam; 032 @Field private Direction direction; 033 034 @Construct public FullyAnnotated(@ParamA String constructorParam, @ParamB @Optional int anInt) { 035 this.field = constructorParam; 036 this.stringList = new ArrayList(); 037 } 038 039 @Method public void doIt(int i, boolean b, double d, short s){} 040 041 @Method public void doMore(Cheese cheese, Fun fun){} 042 043 @Type enum Direction { 044 NORTH, SOUTH, EAST, WEST 045 } 046 047 public Direction getDirection() { 048 return direction; 049 } 050 051 public void setDirection(Direction direction) { 052 this.direction = direction; 053 } 054 055 public Cheese getSpam() { 056 return spam; 057 } 058 059 public void setSpam(Cheese spam) { 060 this.spam = spam; 061 } 062 063 public void setSpam(Object spam) { 064 this.spam = (Cheese)spam; 065 } 066 067 @Get @Method public String getField() { 068 @Variable String theField = this.field; 069 return theField; 070 } 071 072 @Set @Method public void setField(@ParamB String methodParam) { 073 this.field = methodParam; 074 } 075 076 @Get @Method public char[] getCharacters() { 077 return characters; 078 } 079 080 @Set @Method public void setCharacters(char[] characters) { 081 this.characters = characters; 082 } 083 084 @Get @Method public String[] getStrings() { 085 return strings; 086 } 087 088 @Set @Method public void setStrings(String[] strings) { 089 this.strings = strings; 090 } 091 092 @Get @Method public String[][] getMoreStrings() { 093 return moreStrings; 094 } 095 096 @Set @Method public void setMoreStrings(@ParamA String[][] moreStrings) { 097 this.moreStrings = moreStrings; 098 } 099 100 @Get @Method public List<String> getStringList() { 101 return stringList; 102 } 103 104 @Set @Method public void setStringList(List<String> stringList) { 105 this.stringList = stringList; 106 } 107 108 @Set @Method public void setStringList(ArrayList stringList) { 109 this.stringList = stringList; 110 } 111 }