From c5736872dd98266f48beebd566605d4331705829 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 16 Dec 2001 04:45:10 +0000 Subject: [PATCH] Remove the Location class. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270189 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/IntrospectionHelper.java | 14 ---- .../main/org/apache/tools/ant/Location.java | 80 ------------------- .../apache/tools/ant/IntrospectionHelper.java | 14 ---- .../todo/org/apache/tools/ant/Location.java | 80 ------------------- 4 files changed, 188 deletions(-) delete mode 100644 proposal/myrmidon/src/main/org/apache/tools/ant/Location.java delete mode 100644 proposal/myrmidon/src/todo/org/apache/tools/ant/Location.java diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java b/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java index dc6191fa5..c56bc4d9a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -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 ) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/Location.java b/proposal/myrmidon/src/main/org/apache/tools/ant/Location.java deleted file mode 100644 index e48a844dc..000000000 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/Location.java +++ /dev/null @@ -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(); - } -} diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java index dc6191fa5..c56bc4d9a 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java @@ -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 ) diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/Location.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/Location.java deleted file mode 100644 index e48a844dc..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/Location.java +++ /dev/null @@ -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(); - } -}