Package com.thoughtworks.qdox.model

Examples of com.thoughtworks.qdox.model.Type


        for (JavaField javaField : javaClass.getFields()) {
            Annotation[] annotations = javaField.getAnnotations();

            for (Annotation annotation : annotations) {
                Type type = annotation.getType();

                String className = type.getFullyQualifiedName();

                if (className.equals(CacheField.class.getName())) {
                    javaFields.add(javaField);

                    break;
View Full Code Here


        return false;
    }

    private boolean _isStringLocaleMap(JavaParameter javaParameter) {
        Type type = javaParameter.getType();

        Type[] actualArgumentTypes = type.getActualTypeArguments();

        if (actualArgumentTypes.length != 2) {
            return false;
        }
View Full Code Here

         throw new Exception(message + " Number of exceptions should be equal");
      }

      for (int j = 0; j < expectedExceptions.size(); j++)
      {
         Type expectedException = (Type)expectedExceptions.get(j);
         Type actualException = (Type)actualExceptions.get(j);

         if (expectedException.equals(actualException) == false)
         {
            throw new Exception("Exception " + expectedException + " and " + actualException + " should be equal for method " + expected);
         }
View Full Code Here

        }
        if ( fixTag( THROWS_TAG ) && javaMethod.getExceptions() != null && javaMethod.getExceptions().length > 0 )
        {
            for ( int i = 0; i < javaMethod.getExceptions().length; i++ )
            {
                Type exception = javaMethod.getExceptions()[i];

                separatorAdded = appendDefaultThrowsTag( sb, indent, separatorAdded, exception );
            }
        }
        if ( fixTag( SINCE_TAG ) && isNewMethodFromLastRevision( javaMethod ) )
View Full Code Here

        if ( javaMethod.getExceptions() != null )
        {
            for ( int j = 0; j < javaMethod.getExceptions().length; j++ )
            {
                Type exception = javaMethod.getExceptions()[j];

                if ( exception.getValue().endsWith( exceptionClassName ) )
                {
                    originalJavadocTag =
                        StringUtils.replace( originalJavadocTag, exceptionClassName, exception.getValue() );
                    if ( StringUtils.removeDuplicateWhitespace( originalJavadocTag ).trim().endsWith(
                        "@" + THROWS_TAG + " " + exception.getValue() ) )
                    {
                        originalJavadocTag += " if any.";
                    }

                    sb.append( originalJavadocTag );

                    // added qualified name
                    javaEntityTags.putJavadocThrowsTag( exception.getValue(), originalJavadocTag );

                    return;
                }
            }
        }
View Full Code Here

            if ( fixTag( THROWS_TAG ) && javaMethod.getExceptions() != null )
            {
                for ( int i = 0; i < javaMethod.getExceptions().length; i++ )
                {
                    Type exception = javaMethod.getExceptions()[i];

                    if ( javaEntityTags.getJavadocThrowsTag( exception.getValue(), true ) == null )
                    {
                        appendDefaultThrowsTag( sb, indent, exception );
                    }
                }
            }
View Full Code Here

            if ( fixTag( THROWS_TAG ) && javaMethod.getExceptions() != null )
            {
                for ( int i = 0; i < javaMethod.getExceptions().length; i++ )
                {
                    Type exception = javaMethod.getExceptions()[i];

                    separatorAdded = appendDefaultThrowsTag( sb, indent, separatorAdded, exception );
                }
            }
        }
View Full Code Here

        for ( Map.Entry<String, JavaField> entry : rawParams.entrySet() )
        {
            JavaField field = entry.getValue();

            Type type = field.getType();

            Parameter pd = new Parameter();

            if ( !type.isArray() )
            {
                pd.setType( type.getValue() );
            }
            else
            {
                StringBuffer value = new StringBuffer( type.getValue() );

                int remaining = type.getDimensions();

                while ( remaining-- > 0 )
                {
                    value.append( "[]" );
                }
View Full Code Here

                String primitive = method.getReturnType().getGenericValue();
                writer.println( "AsyncCallback<" + WRAPPERS.get( primitive ) + "> callback );" );
            }
            else
            {
                Type returnType = method.getReturnType( true );
                String type = returnType.getGenericValue();

                if ( method.getReturnType().getDimensions() != method.getReturnType( true ).getDimensions() )
                {
                    for ( int dimensions = 0; dimensions < method.getReturnType().getDimensions(); dimensions++ )
                    {
View Full Code Here

   * @param localName - exception classname
   * @return full name of exception ( package included )
   */
  private String getExcFullName(Type types[], String localName) {
    for (int i = 0; i < types.length; i++) {
      Type type = types[i];
      String fullname = type.getValue();
      if (fullname.endsWith(localName)) {
        return fullname;
      }
    }
    return null;
View Full Code Here

TOP

Related Classes of com.thoughtworks.qdox.model.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.