- Revision
- 1269
- Author
- rfscholte
- Date
- 2011-07-16 06:48:28 -0500 (Sat, 16 Jul 2011)
Log Message
Improve javadocs, comments and code conventions
Modified Paths
- trunk/qdox/src/grammar/parser.y
- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaClass.java
- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java
- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaClass.java
Diff
Modified: trunk/qdox/src/grammar/parser.y (1268 => 1269)
--- trunk/qdox/src/grammar/parser.y 2011-07-16 09:39:37 UTC (rev 1268) +++ trunk/qdox/src/grammar/parser.y 2011-07-16 11:48:28 UTC (rev 1269) @@ -206,6 +206,10 @@ }; // 4.3 Reference Types and Values +// Actually +// ReferenceType: ClassOrInterfaceType | TypeVariable | ArrayType +// TypeVariable: Identifier +// ArrayType: Type [ ] ReferenceType: ClassOrInterfaceType Dims_opt { TypeDef td = $1; @@ -226,7 +230,9 @@ { $$ = typeStack.pop(); }; - +// Actually +// TypeDeclSpecifier: TypeName | ClassOrInterfaceType . Identifier +// TypeName: Identifier | TypeName . Identifier TypeDeclSpecifier: AnyName | ClassOrInterfaceType DOT IDENTIFIER {
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaClass.java (1268 => 1269)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaClass.java 2011-07-16 09:39:37 UTC (rev 1268) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaClass.java 2011-07-16 11:48:28 UTC (rev 1269) @@ -39,12 +39,10 @@ private List<JavaMethod> methods = new LinkedList<JavaMethod>(); private List<JavaField> fields = new LinkedList<JavaField>(); private List<JavaClass> classes = new LinkedList<JavaClass>(); - private boolean interfce; - private boolean isEnum; - private boolean isAnnotation; + private boolean anInterface; + private boolean anEnum; + private boolean anAnnotation; - // Don't access this directly. Use asType() to get my Type - private Type type; private Type superClass; private List<Type> implementz = new LinkedList<Type>(); private List<TypeVariable> typeParameters = new LinkedList<TypeVariable>(); @@ -64,15 +62,20 @@ setSource(source); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#isInterface() */ public boolean isInterface() { - return interfce; + return anInterface; } + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#isPrimitive() + */ public boolean isPrimitive() { - String name = getName(); + final String name = getName(); return "void".equals(name) || "boolean".equals(name) || "byte".equals(name) || "char".equals(name) || "short".equals(name) || "int".equals(name) @@ -80,11 +83,8 @@ || "double".equals(name); } - /* (non-Javadoc) - * @see com.thoughtworks.qdox.model.JavaClass#isEnum() - */ public boolean isEnum() { - return isEnum; + return anEnum; } /* (non-Javadoc) @@ -92,7 +92,7 @@ */ public boolean isAnnotation() { - return isAnnotation; + return anAnnotation; } /* (non-Javadoc) @@ -104,9 +104,9 @@ boolean iAmJavaLangObject = OBJECT_TYPE.equals(asType()); - if (isEnum) { + if (anEnum) { return ENUM_TYPE; - } else if (!interfce && !isAnnotation && (superClass == null) && !iAmJavaLangObject) { + } else if (!anInterface && !anAnnotation && (superClass == null) && !iAmJavaLangObject) { return OBJECT_TYPE; } @@ -123,9 +123,9 @@ boolean iAmJavaLangObject = OBJECT_JAVACLASS.equals(this); - if (isEnum) { + if (anEnum) { result = ENUM_JAVACLASS; - } else if (!interfce && !isAnnotation && (superClass == null) && !iAmJavaLangObject) { + } else if (!anInterface && !anAnnotation && (superClass == null) && !iAmJavaLangObject) { result = OBJECT_JAVACLASS; } else if(superClass != null) { @@ -163,16 +163,16 @@ return getModelWriter().writeClass( this ).toString(); } - public void setInterface(boolean interfce) { - this.interfce = interfce; + public void setInterface(boolean anInterface) { + this.anInterface = anInterface; } - public void setEnum(boolean isEnum) { - this.isEnum = isEnum; + public void setEnum(boolean anEnum) { + this.anEnum = anEnum; } - public void setAnnotation(boolean isAnnotation) { - this.isAnnotation = isAnnotation; + public void setAnnotation(boolean anAnnotation) { + this.anAnnotation = anAnnotation; } public void addConstructor( JavaConstructor constructor ) @@ -185,7 +185,7 @@ } public void setSuperClass(Type type) { - if (isEnum) + if (anEnum) { throw new IllegalArgumentException("enums cannot extend other classes"); } @@ -225,7 +225,8 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getParentSource() */ - public JavaSource getParentSource() { + public JavaSource getParentSource() + { return (getParentClass() != null ? getParentClass().getParentSource() : super.getSource()); } @@ -250,7 +251,8 @@ public JavaClassParent getParent() { JavaClassParent result = getParentClass(); - if (result == null) { + if (result == null) + { result = getParentSource(); } return result; @@ -259,30 +261,36 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getPackageName() */ - public String getPackageName() { + public String getPackageName() + { JavaPackage pckg = getPackage(); return ( pckg != null && pckg.getName() != null ) ? pckg.getName() : ""; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getFullyQualifiedName() */ - public String getFullyQualifiedName() { - return (getParentClass() != null ? (getParentClass().getClassNamePrefix()) : getPackage() != null ? (getPackage().getName()+".") : "") + getName(); + public String getFullyQualifiedName() + { + return ( getParentClass() != null ? ( getParentClass().getClassNamePrefix() ) + : getPackage() != null ? ( getPackage().getName() + "." ) : "" ) + + getName(); } - - public String getGenericFullyQualifiedName() { - return getFullyQualifiedName(); - } - - /** - * @return the simple name + + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#getValue() */ public String getValue() { return getName(); } + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#getGenericValue() + */ public String getGenericValue() { return getValue(); @@ -291,27 +299,33 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#isInner() */ - public boolean isInner() { + public boolean isInner() + { return getParentClass() != null; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#resolveType(java.lang.String) */ - public String resolveType(String typeName) { + public String resolveType( String typeName ) + { // Maybe it's an inner class? - for (JavaClass innerClass : getNestedClasses()) { - if (innerClass.getName().equals(typeName)) { + for ( JavaClass innerClass : getNestedClasses() ) + { + if ( innerClass.getName().equals( typeName ) ) + { return innerClass.getFullyQualifiedName(); } } - return getParent().resolveType(typeName); + return getParent().resolveType( typeName ); } /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getClassNamePrefix() */ - public String getClassNamePrefix() { + public String getClassNamePrefix() + { return getFullyQualifiedName() + "$"; } @@ -319,31 +333,30 @@ * @see com.thoughtworks.qdox.model.JavaClass#asType() */ public Type asType() { - if (type == null) { - type = new Type(getFullyQualifiedName(), 0, this); - } - - return type; + return new Type(getFullyQualifiedName(), 0, this); } - /** - * @since 2.0 + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#getConstructors() */ public List<JavaConstructor> getConstructors() { return constructors; } - - /** - * @since 2.0 + + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#getConstructor(java.util.List) */ public JavaConstructor getConstructor( List<Type> parameterTypes ) { return getConstructor( parameterTypes, false ); } - /** - * @since 2.0 + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#getConstructor(java.util.List, boolean) */ public JavaConstructor getConstructor( List<Type> parameterTypes, boolean varArgs ) { @@ -360,28 +373,38 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getMethods() */ - public List<JavaMethod> getMethods() { + public List<JavaMethod> getMethods() + { return methods; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getMethods(boolean) */ - public List<JavaMethod> getMethods(boolean superclasses) { - if (superclasses) { - return new LinkedList<JavaMethod>(getMethodsFromSuperclassAndInterfaces(this, this).values()); - } else { + public List<JavaMethod> getMethods( boolean superclasses ) + { + if ( superclasses ) + { + return new LinkedList<JavaMethod>( getMethodsFromSuperclassAndInterfaces( this, this ).values() ); + } + else + { return getMethods(); } } - private static Map<String, JavaMethod> getMethodsFromSuperclassAndInterfaces(JavaClass rootClass, JavaClass callingClazz) { + private static Map<String, JavaMethod> getMethodsFromSuperclassAndInterfaces( JavaClass rootClass, + JavaClass callingClazz ) + { Map<String, JavaMethod> result = new LinkedHashMap<String, JavaMethod>(); - - for (JavaMethod method : callingClazz.getMethods()) { - if (!method.isPrivate()) { - String signature = method.getDeclarationSignature(false); + + for ( JavaMethod method : callingClazz.getMethods() ) + { + if ( !method.isPrivate() ) + { + String signature = method.getDeclarationSignature( false ); result.put( signature, new JavaMethodDelegate( rootClass, method ) ); } } @@ -389,24 +412,31 @@ JavaClass superclass = callingClazz.getSuperJavaClass(); // TODO workaround for a bug in getSuperJavaClass - if ((superclass != null) && (superclass != callingClazz)) { - Map<String, JavaMethod> superClassMethods = getMethodsFromSuperclassAndInterfaces(callingClazz, superclass); - for(Map.Entry<String, JavaMethod> methodEntry : superClassMethods.entrySet()) { - if (!result.containsKey(methodEntry.getKey())) { + if ( ( superclass != null ) && ( superclass != callingClazz ) ) + { + Map<String, JavaMethod> superClassMethods = + getMethodsFromSuperclassAndInterfaces( callingClazz, superclass ); + for ( Map.Entry<String, JavaMethod> methodEntry : superClassMethods.entrySet() ) + { + if ( !result.containsKey( methodEntry.getKey() ) ) + { result.put( methodEntry.getKey(), new JavaMethodDelegate( superclass, methodEntry.getValue() ) ); } } } - for (JavaClass clazz : callingClazz.getImplementedInterfaces()) { - Map<String, JavaMethod> interfaceMethods = getMethodsFromSuperclassAndInterfaces(callingClazz, clazz); - for(Map.Entry<String, JavaMethod> methodEntry : interfaceMethods.entrySet()) { - if (!result.containsKey(methodEntry.getKey())) { + for ( JavaClass clazz : callingClazz.getImplementedInterfaces() ) + { + Map<String, JavaMethod> interfaceMethods = getMethodsFromSuperclassAndInterfaces( callingClazz, clazz ); + for ( Map.Entry<String, JavaMethod> methodEntry : interfaceMethods.entrySet() ) + { + if ( !result.containsKey( methodEntry.getKey() ) ) + { result.put( methodEntry.getKey(), new JavaMethodDelegate( clazz, methodEntry.getValue() ) ); } } - + } return result; } @@ -505,9 +535,12 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getFieldByName(java.lang.String) */ - public JavaField getFieldByName(String name) { - for ( JavaField field : getFields()) { - if (field.getName().equals(name)) { + public JavaField getFieldByName( String name ) + { + for ( JavaField field : getFields() ) + { + if ( field.getName().equals( name ) ) + { return field; } } @@ -588,9 +621,9 @@ else if (javaClass != null) { // ask our interfaces - for (JavaClass implementz : getImplementedInterfaces()) + for (JavaClass intrfc : getImplementedInterfaces()) { - if (implementz.isA(javaClass)) + if (intrfc.isA(javaClass)) { return true; } @@ -608,81 +641,94 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getBeanProperties() */ - public List<BeanProperty> getBeanProperties() { - return getBeanProperties(false); + public List<BeanProperty> getBeanProperties() + { + return getBeanProperties( false ); } /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getBeanProperties(boolean) */ - public List<BeanProperty> getBeanProperties(boolean superclasses) { - Map<String, BeanProperty> beanPropertyMap = getBeanPropertyMap(superclasses); + public List<BeanProperty> getBeanProperties( boolean superclasses ) + { + Map<String, BeanProperty> beanPropertyMap = getBeanPropertyMap( superclasses ); Collection<BeanProperty> beanPropertyCollection = beanPropertyMap.values(); - return new LinkedList<BeanProperty>(beanPropertyCollection); + return new LinkedList<BeanProperty>( beanPropertyCollection ); } - private Map<String, BeanProperty> getBeanPropertyMap(boolean superclasses) { - List<JavaMethod> methods = getMethods(superclasses); + private Map<String, BeanProperty> getBeanPropertyMap( boolean superclasses ) + { + List<JavaMethod> superMethods = getMethods( superclasses ); Map<String, BeanProperty> beanPropertyMap = new LinkedHashMap<String, BeanProperty>(); // loop over the methods. - for (JavaMethod method:methods) { - if (method.isPropertyAccessor()) { - String propertyName = method.getPropertyName(); - BeanProperty beanProperty = getOrCreateProperty(beanPropertyMap, - propertyName); + for ( JavaMethod superMethod : superMethods ) + { + if ( superMethod.isPropertyAccessor() ) + { + String propertyName = superMethod.getPropertyName(); + BeanProperty beanProperty = getOrCreateProperty( beanPropertyMap, propertyName ); - beanProperty.setAccessor(method); - beanProperty.setType(method.getPropertyType()); - } else if (method.isPropertyMutator()) { - String propertyName = method.getPropertyName(); - BeanProperty beanProperty = getOrCreateProperty(beanPropertyMap, - propertyName); + beanProperty.setAccessor( superMethod ); + beanProperty.setType( superMethod.getPropertyType() ); + } + else if ( superMethod.isPropertyMutator() ) + { + String propertyName = superMethod.getPropertyName(); + BeanProperty beanProperty = getOrCreateProperty( beanPropertyMap, propertyName ); - beanProperty.setMutator(method); - beanProperty.setType(method.getPropertyType()); + beanProperty.setMutator( superMethod ); + beanProperty.setType( superMethod.getPropertyType() ); } } return beanPropertyMap; } - private BeanProperty getOrCreateProperty(Map<String, BeanProperty> beanPropertyMap, - String propertyName) { - BeanProperty result = (BeanProperty) beanPropertyMap.get(propertyName); + private BeanProperty getOrCreateProperty( Map<String, BeanProperty> beanPropertyMap, String propertyName ) + { + BeanProperty result = beanPropertyMap.get( propertyName ); - if (result == null) { - result = new BeanProperty(propertyName); - beanPropertyMap.put(propertyName, result); + if ( result == null ) + { + result = new BeanProperty( propertyName ); + beanPropertyMap.put( propertyName, result ); } return result; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getBeanProperty(java.lang.String) */ - public BeanProperty getBeanProperty(String propertyName) { - return getBeanProperty(propertyName, false); + public BeanProperty getBeanProperty( String propertyName ) + { + return getBeanProperty( propertyName, false ); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getBeanProperty(java.lang.String, boolean) */ - public BeanProperty getBeanProperty(String propertyName, - boolean superclasses) { - return getBeanPropertyMap(superclasses).get(propertyName); + public BeanProperty getBeanProperty( String propertyName, boolean superclasses ) + { + return getBeanPropertyMap( superclasses ).get( propertyName ); } - /** - * Gets the known derived classes. That is, subclasses or implementing classes. + /* + * (non-Javadoc) + * @see com.thoughtworks.qdox.model.JavaClass#getDerivedClasses() */ - public List<JavaClass> getDerivedClasses() { + public List<JavaClass> getDerivedClasses() + { List<JavaClass> result = new LinkedList<JavaClass>(); - for (JavaClass clazz : getSource().getJavaClassLibrary().getJavaClasses()) { - if (clazz.isA(this) && !(clazz == this)) { - result.add(clazz); + for ( JavaClass clazz : getSource().getJavaClassLibrary().getJavaClasses() ) + { + if ( clazz.isA( this ) && !( clazz == this ) ) + { + result.add( clazz ); } } return result; @@ -691,8 +737,9 @@ /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaClass#getTagsByName(java.lang.String, boolean) */ - public List<DocletTag> getTagsByName(String name, boolean superclasses) { - return getTagsRecursive(this, name, superclasses); + public List<DocletTag> getTagsByName( String name, boolean superclasses ) + { + return getTagsRecursive( this, name, superclasses ); } private List<DocletTag> getTagsRecursive(JavaClass javaClass, String name, boolean superclasses) { @@ -707,9 +754,9 @@ result.addAll(getTagsRecursive(superclass, name, superclasses)); } - for (JavaClass implementz : javaClass.getImplementedInterfaces()) { - if (implementz != null) { - result.addAll(getTagsRecursive(implementz, name, superclasses)); + for (JavaClass intrfc : javaClass.getImplementedInterfaces()) { + if (intrfc != null) { + result.addAll(getTagsRecursive(intrfc, name, superclasses)); } } } @@ -719,17 +766,21 @@ /** * @see http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#toString() */ - public String toString() { - StringBuffer sb = new StringBuffer(); - if(isPrimitive()) { - sb.append(getName()); - } - else { - sb.append(isInterface() ? "interface" : "class"); - sb.append(" "); - sb.append(getFullyQualifiedName()); - } - return sb.toString(); + @Override + public String toString() + { + StringBuffer sb = new StringBuffer(); + if ( isPrimitive() ) + { + sb.append( getName() ); + } + else + { + sb.append( isInterface() ? "interface" : "class" ); + sb.append( " " ); + sb.append( getFullyQualifiedName() ); + } + return sb.toString(); } @Override
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java (1268 => 1269)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java 2011-07-16 09:39:37 UTC (rev 1268) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java 2011-07-16 11:48:28 UTC (rev 1269) @@ -48,14 +48,14 @@ result.append( getParentClass().getFullyQualifiedName() ); } result.append( "(" ); - for ( int paramIndex = 0; paramIndex < getParameters().size(); paramIndex++ ) + for ( Iterator<JavaParameter> paramIter = getParameters().iterator(); paramIter.hasNext();) { - if ( paramIndex > 0 ) + String typeValue = paramIter.next().getType().getResolvedValue( getTypeParameters() ); + result.append( typeValue ); + if ( paramIter.hasNext() ) { result.append( "," ); } - String typeValue = getParameters().get( paramIndex ).getType().getResolvedValue( getTypeParameters() ); - result.append( typeValue ); } result.append( ")" ); if ( getExceptions().size() > 0 )
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaClass.java (1268 => 1269)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaClass.java 2011-07-16 09:39:37 UTC (rev 1268) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaClass.java 2011-07-16 11:48:28 UTC (rev 1269) @@ -19,6 +19,8 @@ * under the License. */ +import java.lang.reflect.Member; +import java.lang.reflect.Modifier; import java.util.List; import com.thoughtworks.qdox.library.ClassLibrary; @@ -33,19 +35,33 @@ { /** - * is interface? (otherwise enum or class) + * (API description of {@link java.lang.Class#isInterface()}) + * <p> + * Determines if the specified <code>Class</code> object represents an interface type. + * </p> + * + * @return <code>true</code> if this object represents an interface, otherwise <code>false</code> */ boolean isInterface(); /** - * is enum? (otherwise class or interface) + * (API description of {@link java.lang.Class#isEnum()}) + * <p> + * Returns <code>true</code> if and only if this class was declared as an enum in the source code. + * </p> + * + * @return <code>true</code> if this object represents an enum, otherwise <code>false</code> + */ boolean isEnum(); /** - * (don't know if this is required) + * (API description of {@link java.lang.Class#isAnnotation()}) + * <p>Returns true if this <code>Class</code> object represents an annotation type. + * Note that if this method returns true, {@link #isInterface()} would also return true, as all annotation types are also interfaces. + * </p> * - * @return + * @return <code>true</code> if this object represents an annotation, otherwise <code>false</code> * @since 2.0 */ boolean isAnnotation(); @@ -78,21 +94,39 @@ * If this class has a package, the packagename will be returned. * Otherwise an empty String. * - * @return + * @return the name of the package, otherwise an empty String */ String getPackageName(); String getFullyQualifiedName(); - String getGenericFullyQualifiedName(); - /** * @since 1.3 + * @return <code>true</code> if this class is an inner class, otherwise <code>false</code> */ boolean isInner(); - String resolveType( String typeName ); + /** + * Tries to return the fully qualified name based on the name. + * The name tries to match the following: + * <ul> + * <li>primitives or void</li> + * <li>java.lang.*</li> + * <li>inner classes</li> + * <li>explicit imports</li> + * <li>implicit imports</li> + * </ul> + * + * @return the resolved name, otherwise the name itself. + */ + String resolveType( String name ); + /** + * If this class has a package, it will return the package name, followed by a "."(dot). + * Otherwise it will return an empty String + * + * @return the package name plus a dot if there's a package, otherwise an empty String + */ String getClassNamePrefix(); @Deprecated @@ -198,6 +232,9 @@ List<JavaClass> getClasses(); /** + * Equivalent of {@link Class#getDeclaredClasses()} + * + * @return a list of declared classes, never <code>null</code> * @since 1.3 */ List<JavaClass> getNestedClasses(); @@ -239,6 +276,7 @@ BeanProperty getBeanProperty( String propertyName, boolean superclasses ); /** + * Equivalent of {@link Class#getClasses()} * Gets the known derived classes. That is, subclasses or implementing classes. */ List<JavaClass> getDerivedClasses(); @@ -247,14 +285,25 @@ ClassLibrary getJavaClassLibrary(); + /** + * Equivalent of {@link java.lang.Class#getName()}. + * + * @return the fully qualified name of the class + */ String getName(); /** * If there's a reference to this class, use the value used in the code. Otherwise return the simple name. * When including all imports, you should be safe to use this method. - * This won't return generics, so it's java1.4 safe. + * This won't return generics, so it's java1.4 safe. * - * @return + * Examples: + * <pre> + * private String fieldA; // getValue() will return "String" + * private java.lang.String fieldA; // getValue() will return "java.lang.String" + * </pre> + * + * @return the name of the class as used in the source source */ String getValue(); @@ -266,54 +315,82 @@ */ String getGenericValue(); + /** + * Equivalent of {@link Class#getModifiers()} + * + * <strong>This does not follow the java-api</strong> + * The Class.getModifiers() returns an <code>int</code>, which should be decoded with the {@link Modifier}. + * This method will return a list of strings representing the modifiers. + * If this member was extracted from a source, it will keep its order. + * Otherwise if will be in the preferred order of the java-api. + * + * @return all modifiers is this member + */ List<String> getModifiers(); /** + * (API description of {@link Modifier#isPublic(int)}) + * <p> * Return <code>true</code> if the class includes the public modifier, <code>false</code> otherwise. + * <p> * - * @return <code>true</code> if class the public modifier; <code>false</code> otherwise. + * @return <code>true</code> if class has the public modifier, otherwise <code>false</code> */ boolean isPublic(); /** + * (API description of {@link Modifier#isProtected(int)}) + * <p> * Return <code>true</code> if the class includes the protected modifier, <code>false</code> otherwise. + * </p> * - * @return <code>true</code> if class the protected modifier; <code>false</code> otherwise. + * @return <code>true</code> if class has the protected modifier, otherwise <code>false</code> */ boolean isProtected(); /** + * (API description of {@link Modifier#isPrivate(int)}) + * <p> * Return <code>true</code> if the class includes the private modifier, <code>false</code> otherwise. + * </p> * - * @return <code>true</code> if class the private modifier; <code>false</code> otherwise. + * @return <code>true</code> if class has the private modifier, otherwise <code>false</code> */ boolean isPrivate(); /** + * (API description of {@link Modifier#isFinal(int)}) + * <p> * Return <code>true</code> if the class includes the final modifier, <code>false</code> otherwise. + * </p> * - * @return <code>true</code> if class the final modifier; <code>false</code> otherwise. + * @return <code>true</code> if class has the final modifier, otherwise <code>false</code> */ boolean isFinal(); /** + * (API description of {@link Modifier#isStatic((int)}) + * <p> * Return <code>true</code> if the class includes the static modifier, <code>false</code> otherwise. + * </p> * - * @return <code>true</code> if class the static modifier; <code>false</code> otherwise. + * @return <code>true</code> if class the static modifier, otherwise <code>false</code> */ boolean isStatic(); /** + * (API description of {@link Modifier#isAbstract(int)}) + * * Return <code>true</code> if the class includes the abstract modifier, <code>false</code> otherwise. * - * @return <code>true</code> if class the abstract modifier; <code>false</code> otherwise. + * @return <code>true</code> if class has the abstract modifier, otherwise <code>false</code> */ boolean isAbstract(); boolean isPrimitive(); /** - * (API description of java.lang.Class.toString()) + * (API description of {@link java.lang.Class#toString()}) * * Converts the object to a string. * The string representation is the string "class" or "interface", followed by a space, and then by the fully qualified name of the class in the format returned by <code>getName</code>.
To unsubscribe from this list please visit:
