Browse Source

Remove the Location class.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270189 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
c5736872dd
4 changed files with 0 additions and 188 deletions
  1. +0
    -14
      proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java
  2. +0
    -80
      proposal/myrmidon/src/main/org/apache/tools/ant/Location.java
  3. +0
    -14
      proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java
  4. +0
    -80
      proposal/myrmidon/src/todo/org/apache/tools/ant/Location.java

+ 0
- 14
proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -87,20 +87,6 @@ public class IntrospectionHelper implements BuildListener
Class returnType = m.getReturnType();
Class[] args = m.getParameterTypes();

// not really user settable properties on tasks
if( org.apache.tools.ant.Task.class.isAssignableFrom( bean )
&& args.length == 1 &&
(
(
"setLocation".equals( name ) && org.apache.tools.ant.Location.class.equals( args[ 0 ] )
) || (
"setTaskType".equals( name ) && java.lang.String.class.equals( args[ 0 ] )
)
) )
{
continue;
}

// hide addTask for TaskContainers
if( org.apache.tools.ant.TaskContainer.class.isAssignableFrom( bean )
&& args.length == 1 && "addTask".equals( name )


+ 0
- 80
proposal/myrmidon/src/main/org/apache/tools/ant/Location.java View File

@@ -1,80 +0,0 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.tools.ant;

/**
* Stores the file name and line number in a file.
*
* @author RT
*/
public class Location
{

public final static Location UNKNOWN_LOCATION = new Location();
private int columnNumber;
private String fileName;
private int lineNumber;

/**
* Creates a location consisting of a file name but no line number.
*
* @param fileName Description of Parameter
*/
public Location( String fileName )
{
this( fileName, 0, 0 );
}

/**
* Creates a location consisting of a file name and line number.
*
* @param fileName Description of Parameter
* @param lineNumber Description of Parameter
* @param columnNumber Description of Parameter
*/
public Location( String fileName, int lineNumber, int columnNumber )
{
this.fileName = fileName;
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
}

/**
* Creates an "unknown" location.
*/
private Location()
{
this( null, 0, 0 );
}

/**
* Returns the file name, line number and a trailing space. An error message
* can be appended easily. For unknown locations, returns an empty string.
*
* @return Description of the Returned Value
*/
public String toString()
{
StringBuffer buf = new StringBuffer();

if( fileName != null )
{
buf.append( fileName );

if( lineNumber != 0 )
{
buf.append( ":" );
buf.append( lineNumber );
}

buf.append( ": " );
}

return buf.toString();
}
}

+ 0
- 14
proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -87,20 +87,6 @@ public class IntrospectionHelper implements BuildListener
Class returnType = m.getReturnType();
Class[] args = m.getParameterTypes();

// not really user settable properties on tasks
if( org.apache.tools.ant.Task.class.isAssignableFrom( bean )
&& args.length == 1 &&
(
(
"setLocation".equals( name ) && org.apache.tools.ant.Location.class.equals( args[ 0 ] )
) || (
"setTaskType".equals( name ) && java.lang.String.class.equals( args[ 0 ] )
)
) )
{
continue;
}

// hide addTask for TaskContainers
if( org.apache.tools.ant.TaskContainer.class.isAssignableFrom( bean )
&& args.length == 1 && "addTask".equals( name )


+ 0
- 80
proposal/myrmidon/src/todo/org/apache/tools/ant/Location.java View File

@@ -1,80 +0,0 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.tools.ant;

/**
* Stores the file name and line number in a file.
*
* @author RT
*/
public class Location
{

public final static Location UNKNOWN_LOCATION = new Location();
private int columnNumber;
private String fileName;
private int lineNumber;

/**
* Creates a location consisting of a file name but no line number.
*
* @param fileName Description of Parameter
*/
public Location( String fileName )
{
this( fileName, 0, 0 );
}

/**
* Creates a location consisting of a file name and line number.
*
* @param fileName Description of Parameter
* @param lineNumber Description of Parameter
* @param columnNumber Description of Parameter
*/
public Location( String fileName, int lineNumber, int columnNumber )
{
this.fileName = fileName;
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
}

/**
* Creates an "unknown" location.
*/
private Location()
{
this( null, 0, 0 );
}

/**
* Returns the file name, line number and a trailing space. An error message
* can be appended easily. For unknown locations, returns an empty string.
*
* @return Description of the Returned Value
*/
public String toString()
{
StringBuffer buf = new StringBuffer();

if( fileName != null )
{
buf.append( fileName );

if( lineNumber != 0 )
{
buf.append( ":" );
buf.append( lineNumber );
}

buf.append( ": " );
}

return buf.toString();
}
}

Loading…
Cancel
Save