001/* 002 * Copyright 2012 Atteo. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.atteo.evo.config.doclet; 017 018import java.util.ArrayList; 019import java.util.List; 020 021import javax.xml.bind.annotation.XmlAccessType; 022 023import com.sun.javadoc.ClassDoc; 024 025public class ClassDescription { 026 private String tagName; 027 private XmlAccessType accessType; 028 private List<ElementDescription> attributes = new ArrayList<ElementDescription>(); 029 private List<ElementDescription> elements = new ArrayList<ElementDescription>(); 030 private String summary; 031 private ClassDoc classDoc; 032 033 public XmlAccessType getAccessType() { 034 return accessType; 035 } 036 037 public void setAccessType(XmlAccessType accessType) { 038 this.accessType = accessType; 039 } 040 041 public String getTagName() { 042 return tagName; 043 } 044 045 public void setTagName(String tagName) { 046 this.tagName = tagName; 047 } 048 049 public List<ElementDescription> getElements() { 050 return elements; 051 } 052 053 public List<ElementDescription> getAttributes() { 054 return attributes; 055 } 056 057 public void addElement(ElementDescription element) { 058 if (element.getType() == ElementType.ATTRIBUTE) { 059 attributes.add(element); 060 } else { 061 elements.add(element); 062 } 063 } 064 065 public String getSummary() { 066 return summary; 067 } 068 069 public void setSummary(String summary) { 070 this.summary = summary; 071 } 072 073 public ClassDoc getClassDoc() { 074 return classDoc; 075 } 076 077 public void setClassDoc(ClassDoc classDoc) { 078 this.classDoc = classDoc; 079 } 080}