Tabnine Logo
Parameter.getValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getValue
method
in
org.apache.tools.ant.types.Parameter

Best Java code snippets using org.apache.tools.ant.types.Parameter.getValue (Showing top 20 results out of 315)

origin: pmd/pmd

private Properties createProperties() {
  Properties properties = new Properties();
  for (Parameter parameter : parameters) {
    properties.put(parameter.getName(), parameter.getValue());
  }
  return properties;
}
origin: org.apache.ant/ant

/**
 * Scans the parameters list for the "lines" parameter and uses
 * it to set the number of lines to be returned in the filtered stream.
 * also scan for skip parameter.
 */
private void initialize() {
  Parameter[] params = getParameters();
  if (params != null) {
    for (Parameter param : params) {
      final String paramName = param.getName();
      if (LINES_KEY.equals(paramName)) {
        lines = Long.parseLong(param.getValue());
      } else if (SKIP_KEY.equals(paramName)) {
        skip = Long.parseLong(param.getValue());
      }
    }
  }
}
origin: org.apache.ant/ant

/**
 * Parses the parameters to set the comment prefixes.
 */
private void initialize() {
  Parameter[] params = getParameters();
  if (params != null) {
    for (Parameter param : params) {
      if (COMMENTS_KEY.equals(param.getType())) {
        comments.addElement(param.getValue());
      }
    }
  }
}
origin: org.apache.ant/ant

/**
 * Scans the parameters list for the "lines" parameter and uses
 * it to set the number of lines to be returned in the filtered stream.
 * also scan for "skip" parameter.
 */
private void initialize() {
  Parameter[] params = getParameters();
  if (params != null) {
    for (Parameter param : params) {
      final String paramName = param.getName();
      if (LINES_KEY.equals(paramName)) {
        setLines(Long.parseLong(param.getValue()));
      } else if (SKIP_KEY.equals(paramName)) {
        skip = Long.parseLong(param.getValue());
      }
    }
  }
}
origin: org.apache.ant/ant

  /**
   * Initializes the prefix if it is available from the parameters.
   */
  private void initialize() {
    Parameter[] params = getParameters();
    if (params != null) {
      for (Parameter param : params) {
        if (PREFIX_KEY.equals(param.getName())) {
          prefix = param.getValue();
          break;
        }
      }
    }
  }
}
origin: org.apache.ant/ant

  /**
   * Initializes the suffix if it is available from the parameters.
   */
  private void initialize() {
    Parameter[] params = getParameters();
    if (params != null) {
      for (Parameter param : params) {
        if (SUFFIX_KEY.equals(param.getName())) {
          suffix = param.getValue();
          break;
        }
      }
    }
  }
}
origin: org.apache.ant/ant

  /**
   * Parses the parameters to set the tab length.
   */
  private void initialize() {
    Parameter[] params = getParameters();
    if (params != null) {
      for (Parameter param : params) {
        if (param != null) {
          if (TAB_LENGTH_KEY.equals(param.getName())) {
            tabLength = Integer.parseInt(param.getValue());
            break;
          }
        }
      }
    }
  }
}
origin: org.apache.ant/ant

/**
 * Parses the parameters to add user-defined contains strings.
 */
private void initialize() {
  Parameter[] params = getParameters();
  if (params != null) {
    for (Parameter param : params) {
      if (CONTAINS_KEY.equals(param.getType())) {
        contains.addElement(param.getValue());
      } else if (NEGATE_KEY.equals(param.getType())) {
        setNegate(Project.toBoolean(param.getValue()));
      }
    }
  }
}
origin: org.apache.ant/ant

/**
 * Initializes tokens and loads the replacee-replacer hashtable.
 */
private void initialize() {
  Parameter[] params = getParameters();
  if (params != null) {
    for (Parameter param : params) {
      if (param != null) {
        final String type = param.getType();
        if ("tokenchar".equals(type)) {
          final String name = param.getName();
          if ("begintoken".equals(name)) {
            beginToken = param.getValue();
          } else if ("endtoken".equals(name)) {
            endToken = param.getValue();
          }
        } else if ("token".equals(type)) {
          final String name = param.getName();
          final String value = param.getValue();
          hash.put(name, value);
        } else if ("propertiesfile".equals(type)) {
          makeTokensFromProperties(
              new FileResource(new File(param.getValue())));
        }
      }
    }
  }
}
origin: org.apache.ant/ant

  /**
   * Parses the parameters to set the line-breaking characters.
   */
  private void initialize() {
    String userDefinedLineBreaks = null;
    Parameter[] params = getParameters();
    if (params != null) {
      for (Parameter param : params) {
        if (LINE_BREAKS_KEY.equals(param.getName())) {
          userDefinedLineBreaks = param.getValue();
          break;
        }
      }
    }
    if (userDefinedLineBreaks != null) {
      lineBreaks = userDefinedLineBreaks;
    }
  }
}
origin: org.apache.ant/ant

if (MIN_KEY.equalsIgnoreCase(paramname)) {
  try {
    setMin(Integer.parseInt(parameter.getValue()));
  } catch (NumberFormatException nfe1) {
    setError("Invalid minimum value "
        + parameter.getValue());
    setMax(Integer.parseInt(parameter.getValue()));
  } catch (NumberFormatException nfe1) {
    setError("Invalid maximum value "
        + parameter.getValue());
origin: org.apache.ant/ant

final String paramName = param.getName();
if (REVERSE_KEY.equals(paramName)) {
  setReverse(Boolean.valueOf(param.getValue()));
} else if (COMPARATOR_KEY.equals(paramName)) {
  try {
    String className = param.getValue();
    @SuppressWarnings("unchecked")
    final Comparator<? super String> comparatorInstance
origin: org.apache.ant/ant

if (MILLIS_KEY.equalsIgnoreCase(paramname)) {
  try {
    setMillis(Long.parseLong(parameter.getValue()));
  } catch (NumberFormatException nfe) {
    setError("Invalid millisecond setting "
        + parameter.getValue());
  setDatetime(parameter.getValue());
} else if (CHECKDIRS_KEY.equalsIgnoreCase(paramname)) {
  setCheckdirs(Project.toBoolean(parameter.getValue()));
} else if (GRANULARITY_KEY.equalsIgnoreCase(paramname)) {
  try {
    setGranularity(Integer.parseInt(parameter.getValue()));
  } catch (NumberFormatException nfe) {
    setError("Invalid granularity setting "
        + parameter.getValue());
  setWhen(new TimeComparison(parameter.getValue()));
} else if (PATTERN_KEY.equalsIgnoreCase(paramname)) {
  setPattern(parameter.getValue());
} else {
  setError("Invalid parameter " + paramname);
origin: org.apache.ant/ant

final String paramName = param.getName();
if ("prepend".equals(paramName)) {
  setPrepend(new File(param.getValue()));
} else if ("append".equals(paramName)) {
  setAppend(new File(param.getValue()));
origin: org.apache.ant/ant

/**
 * When using this as a custom selector, this method will be called.
 * It translates each parameter into the appropriate setXXX() call.
 *
 * @param parameters the complete set of parameters for this selector
 */
public void setParameters(Parameter... parameters) {
  super.setParameters(parameters);
  if (parameters != null) {
    for (Parameter parameter : parameters) {
      String paramname = parameter.getName();
      if (NAME_KEY.equalsIgnoreCase(paramname)) {
        setName(parameter.getValue());
      } else if (CASE_KEY.equalsIgnoreCase(paramname)) {
        setCasesensitive(Project.toBoolean(
            parameter.getValue()));
      } else if (NEGATE_KEY.equalsIgnoreCase(paramname)) {
        setNegate(Project.toBoolean(parameter.getValue()));
      } else if (REGEX_KEY.equalsIgnoreCase(paramname)) {
        setRegex(parameter.getValue());
      } else {
        setError("Invalid parameter " + paramname);
      }
    }
  }
}
origin: org.apache.ant/ant

  /**
   * Parses parameters to add user defined regular expressions.
   */
  private void initialize() {
    Parameter[] params = getParameters();
    if (params != null) {
      for (Parameter param : params) {
        if (REGEXP_KEY.equals(param.getType())) {
          setRegexp(param.getValue());
        } else if (NEGATE_KEY.equals(param.getType())) {
          setNegate(Project.toBoolean(param.getValue()));
        } else if (CS_KEY.equals(param.getType())) {
          setCaseSensitive(Project.toBoolean(param.getValue()));
        }
      }
    }
  }
}
origin: org.apache.ant/ant

/**
 * When using this as a custom selector, this method will be called.
 * It translates each parameter into the appropriate setXXX() call.
 *
 * @param parameters the complete set of parameters for this selector
 */
public void setParameters(Parameter... parameters) {
  super.setParameters(parameters);
  if (parameters != null) {
    for (Parameter parameter : parameters) {
      String paramname = parameter.getName();
      if (EXPRESSION_KEY.equalsIgnoreCase(paramname)) {
        setExpression(parameter.getValue());
      } else if (CS_KEY.equalsIgnoreCase(paramname)) {
        setCaseSensitive(Project.toBoolean(parameter.getValue()));
      } else if (ML_KEY.equalsIgnoreCase(paramname)) {
        setMultiLine(Project.toBoolean(parameter.getValue()));
      } else if (SL_KEY.equalsIgnoreCase(paramname)) {
        setSingleLine(Project.toBoolean(parameter.getValue()));
      } else {
        setError("Invalid parameter " + paramname);
      }
    }
  }
}
origin: org.apache.ant/ant

/**
 * When using this as a custom selector, this method will be called.
 * It translates each parameter into the appropriate setXXX() call.
 *
 * @param parameters the complete set of parameters for this selector
 */
public void setParameters(Parameter... parameters) {
  super.setParameters(parameters);
  if (parameters != null) {
    for (Parameter parameter : parameters) {
      String paramname = parameter.getName();
      if (CONTAINS_KEY.equalsIgnoreCase(paramname)) {
        setText(parameter.getValue());
      } else if (CASE_KEY.equalsIgnoreCase(paramname)) {
        setCasesensitive(Project.toBoolean(
            parameter.getValue()));
      } else if (WHITESPACE_KEY.equalsIgnoreCase(paramname)) {
        setIgnorewhitespace(Project.toBoolean(
            parameter.getValue()));
      } else {
        setError("Invalid parameter " + paramname);
      }
    }
  }
}
origin: org.apache.ant/ant

if (SIZE_KEY.equalsIgnoreCase(paramname)) {
  try {
    setValue(Long.parseLong(parameter.getValue()));
  } catch (NumberFormatException nfe) {
    setError("Invalid size setting "
        + parameter.getValue());
  units.setValue(parameter.getValue());
  setUnits(units);
} else if (WHEN_KEY.equalsIgnoreCase(paramname)) {
  SizeComparisons scmp = new SizeComparisons();
  scmp.setValue(parameter.getValue());
  setWhen(scmp);
} else {
origin: org.apache.ant/ant

/**
 * When using this as a custom selector, this method will be called.
 * It translates each parameter into the appropriate setXXX() call.
 *
 * @param parameters the complete set of parameters for this selector
 */
@Override
public void setParameters(Parameter... parameters) {
  super.setParameters(parameters);
  if (parameters != null) {
    for (Parameter parameter : parameters) {
      String paramname = parameter.getName();
      if (TYPE_KEY.equalsIgnoreCase(paramname)) {
        FileType t = new FileType();
        t.setValue(parameter.getValue());
        setType(t);
      } else {
        setError("Invalid parameter " + paramname);
      }
    }
  }
}
org.apache.tools.ant.typesParametergetValue

Javadoc

Get the value attribute.

Popular methods of Parameter

  • getName
    Get the name attribute.
  • <init>
  • setName
    Set the name attribute.
  • setValue
    Set the value attribute.
  • getType
    Get the type attribute.

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now