易截截图软件、单文件、免安装、纯绿色、仅160KB

java log add function

#dd_traces.pl (C) Marko Kivij?rvi 2006
# Dummy checks
die "Specify an input file!\n" if $ARGV[0] eq "";
die "File not found!\n" unless -e $ARGV[0];
die "Incorrect file extension for a C/C++ file!\n"
    if ( $ARGV[0] !~ /(.*)\.(java)$/ );
# Constants
my $IMPORT_LOG_PACKAG = "\nimport android.util.Log;";
my $TAG;
if( $ARGV[0] !~ /BaseAdapter\.java/ && $ARGV[0] !~ /View\.java/) {
    $TAG="SWIFTTAG";
}
else {
    $TAG="SWIFTBASETAG";
}
# Parse output filename from the input filename
my $file = $ARGV[0];
my $origFile = $1."-orig.".$2;
#system( "cp $file $origFile" );
# Reset the input record separator (newline) so the entire file is read at once
undef $/;
# Read the input file
$_ = <>;                                 # All there
# Adds a tracer macro after each function definition
s/
    package #package
    \s+
    [^{;\/(\s]*\.[^{;\/(\s]*        # package name
    ;
/
    AddLogImport(tiny_mce_markeramp;)    # Print the match and add the macro
/gxe;                         # g = repeat, x = split regex to multiple lines, e = evaluate substitution
s/
    (public|private|protected)?   #api property type
    (\s+)?
    (abstract)?
    (\s+)?
    class                                     # Possible function return type
    \s+                                       # One or more empty spaces
    (\b\w+?)         &n


相关文档:

java 路径

java(Web)中相对路径,绝对路径问题总结
    java中相对路径,绝对路径问题总结
               ————bohemia(城)
前言:
前一段时间,由于在处理Web应用下的文件创建与移动等,因此涉及到很多关于java
中相对路径,绝对路径等问题。同时,对于Web应用中的 ......

java 插件加载

package tao.hai.bing;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
public class LoadJar {
 public static void main(String[] args)
 {
  Syst ......

Java程序修改文件名

package script;
import java.io.File;
import java.io.IOException;
public class Realname {
 public static void main(String[] args) throws IOException
 {
 
  File oldFile = new File("d:/PMS");
  if(!oldFile.exists())
  {
   oldFile. ......

java 两个时间段有多少天

public static void main(String args[]){
   
     Date calr1=new Date(2010, 3,1);
     Date calr2=new Date(2010,3,31);
  
     Long n=calr2.getTime()-calr1.getTime();
     int a=(int)(n/ ......

Java字符串使用总结

      Java字符串使用总结
      
      前言:
      这篇文章的目的是提醒大家对字符串三种类型做个综合的比较,使得在使用字符串三种类的时候有个选择依据,这样可以极大提高程序运行的效率。如果你对这 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号