1 /* 2 * Copyright (C) 2007-2010 Júlio Vilmar Gesser. 3 * Copyright (C) 2011, 2013-2016 The JavaParser Team. 4 * 5 * This file is part of JavaParser. 6 * 7 * JavaParser can be used either under the terms of 8 * a) the GNU Lesser General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * b) the terms of the Apache License 12 * 13 * You should have received a copy of both licenses in LICENCE.LGPL and 14 * LICENCE.APACHE. Please refer to those files for details. 15 * 16 * JavaParser is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License for more details. 20 */ 21 22 package com.github.javaparser.resolution.declarations; 23 24 import com.github.javaparser.resolution.types.ResolvedReferenceType; 25 26 import java.util.List; 27 28 /** 29 * Declaration of a Class (not an interface or an enum). 30 * 31 * @author Federico Tomassetti 32 */ 33 public interface ResolvedClassDeclaration extends ResolvedReferenceTypeDeclaration, 34 ResolvedTypeParametrizable, HasAccessSpecifier { 35 36 /** 37 * This method should always return true. 38 */ 39 @Override isClass()40 default boolean isClass() { 41 return true; 42 } 43 44 /** 45 * This is a ReferenceTypeUsage because it could contain type typeParametersValues. 46 * For example: class A extends B<Integer, String>. 47 * <p> 48 * Note that only the Object class should not have a superclass and therefore 49 * return null. 50 */ getSuperClass()51 ResolvedReferenceType getSuperClass(); 52 53 /** 54 * Return all the interfaces implemented directly by this class. 55 * It does not include the interfaces implemented by superclasses or extended 56 * by the interfaces implemented. 57 */ getInterfaces()58 List<ResolvedReferenceType> getInterfaces(); 59 60 /** 61 * Get all superclasses, with all the type typeParametersValues expressed as functions of the type 62 * typeParametersValues of this declaration. 63 */ getAllSuperClasses()64 List<ResolvedReferenceType> getAllSuperClasses(); 65 66 /** 67 * Return all the interfaces implemented by this class, either directly or indirectly, including the interfaces 68 * extended by interfaces it implements. 69 * <p> 70 * Get all interfaces, with all the type typeParametersValues expressed as functions of the type 71 * typeParametersValues of this declaration. 72 */ getAllInterfaces()73 List<ResolvedReferenceType> getAllInterfaces(); 74 75 /// 76 /// Constructors 77 /// 78 79 /** 80 * List of constructors available for the class. 81 * This list should also include the default constructor. 82 */ getConstructors()83 List<ResolvedConstructorDeclaration> getConstructors(); 84 85 } 86