Examples of JavaFile


Examples of org.apache.maven.jxr.pacman.JavaFile

     */
    public final String getPackageRoot()
    {
        StringBuffer buff = new StringBuffer();

        JavaFile jf = null;

        try
        {
            jf = fileManager.getFile( this.getCurrentFilename() );
        }
        catch ( IOException e )
        {
            e.printStackTrace();
            return null;
        }

        String current = jf.getPackageType().getName();

        int count = this.getPackageCount( current );

        for ( int i = 0; i < count; ++i )
        {
View Full Code Here

Examples of org.apache.maven.jxr.pacman.JavaFile

            //get the URI to get Javadoc info.
            StringBuffer javadocURI = new StringBuffer().append( javadocLinkDir );

            try
            {
                JavaFile jf = fileManager.getFile( this.getCurrentFilename() );

                javadocURI.append( StringUtils.replace( jf.getPackageType().getName(), ".", "/" ) );
                javadocURI.append( "/" );
                // Use the name of the file instead of the class to handle inner classes properly
                if ( jf.getClassType() != null && jf.getClassType().getFilename() != null )
                {
                    javadocURI.append( jf.getClassType().getFilename() );
                }
                else
                {
                    return "";
                }
View Full Code Here

Examples of org.apache.maven.jxr.pacman.JavaFile

     * @param line String
     * @return String
     */
    private final String jxrFilter( String line )
    {
        JavaFile jf = null;

        try
        {
            //if the current file isn't set then just return
            if ( this.getCurrentFilename() == null )
            {
                return line;
            }

            jf = fileManager.getFile( this.getCurrentFilename() );
        }
        catch ( IOException e )
        {
            e.printStackTrace();
            return line;
        }

        Vector v = new Vector();

        //get the imported packages
        ImportType[] imports = jf.getImportTypes();
        for ( int j = 0; j < imports.length; ++j )
        {
            v.addElement( imports[j].getPackage() );
        }

        //add the current package.
        v.addElement( jf.getPackageType().getName() );

        String[] packages = new String[v.size()];
        v.copyInto( packages );

        StringEntry[] words = SimpleWordTokenizer.tokenize( line );
View Full Code Here

Examples of org.apache.maven.jxr.pacman.JavaFile

        // title ("classname xref")
        buffer.append( "<title>" );
        try
        {
            JavaFile javaFile = fileManager.getFile( this.getCurrentFilename() );
            // Use the name of the file instead of the class to handle inner classes properly
            if ( javaFile.getClassType() != null && javaFile.getClassType().getFilename() != null )
            {
                buffer.append( javaFile.getClassType().getFilename() );
            }
            else
            {
                buffer.append( this.getCurrentFilename() );
            }
View Full Code Here

Examples of org.apache.maven.jxr.pacman.JavaFile

     */
    public final String getPackageRoot()
    {
        StringBuffer buff = new StringBuffer();

        JavaFile jf = null;

        try
        {
            jf = fileManager.getFile( this.getCurrentFilename() );
        }
        catch ( IOException e )
        {
            e.printStackTrace();
            return null;
        }

        String current = jf.getPackageType().getName();

        int count = this.getPackageCount( current );

        for ( int i = 0; i < count; ++i )
        {
View Full Code Here

Examples of org.apache.maven.jxr.pacman.JavaFile

            //get the URI to get Javadoc info.
            StringBuffer javadocURI = new StringBuffer().append( javadocLinkDir );

            try
            {
                JavaFile jf = fileManager.getFile( this.getCurrentFilename() );

                javadocURI.append( StringUtils.replace( jf.getPackageType().getName(), ".", "/" ) );
                javadocURI.append( "/" );
                // Use the name of the file instead of the class to handle inner classes properly
                if ( jf.getClassType() != null && jf.getClassType().getFilename() != null )
                {
                    javadocURI.append( jf.getClassType().getFilename() );
                }
                else
                {
                    return "";
                }
View Full Code Here

Examples of org.apache.maven.jxr.pacman.JavaFile

     * @param line String
     * @return String
     */
    private final String jxrFilter( String line )
    {
        JavaFile jf = null;

        try
        {
            //if the current file isn't set then just return
            if ( this.getCurrentFilename() == null )
            {
                return line;
            }

            jf = fileManager.getFile( this.getCurrentFilename() );
        }
        catch ( IOException e )
        {
            e.printStackTrace();
            return line;
        }

        Vector v = new Vector();

        //get the imported packages
        ImportType[] imports = jf.getImportTypes();
        for ( int j = 0; j < imports.length; ++j )
        {
            v.addElement( imports[j].getPackage() );
        }

        //add the current package.
        v.addElement( jf.getPackageType().getName() );

        String[] packages = new String[v.size()];
        v.copyInto( packages );

        StringEntry[] words = SimpleWordTokenizer.tokenize( line );
View Full Code Here

Examples of org.sonar.api.resources.JavaFile

    }

    @Override
    public Resource<?> resolve(String type, String name) {
        if (JavaLanguageElement.Type.name().equals(type)) {
            return new JavaFile(name);
        } else if (JavaLanguageElement.Field.name().equals(type) || JavaLanguageElement.MethodInvocation.name().equals(type)
                || JavaLanguageElement.ReadField.name().equals(type) || JavaLanguageElement.WriteField.name().equals(type)
                || JavaLanguageElement.MethodInvocation.name().equals(type)) {
            return new JavaFile(name.split("#")[0]);
        } else if (JavaLanguageElement.Package.name().equals(type)) {
            return new JavaPackage(name);
        }
        return null;
    }
View Full Code Here

Examples of org.sonar.api.resources.JavaFile

    SquidUtils.convertJavaPackageKeyFromSquidFormat("java/lang");
  }

  @Test(expected = UnsupportedOperationException.class)
  public void shouldConvertToSquidKeyFormat() {
    SquidUtils.convertToSquidKeyFormat(new JavaFile("com.foo.Bar"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.