Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ʵÏÖÀûÓÃËÑË÷ÒýÇæÊÕ¼¯ÍøÖ·µÄ³ÌÐò

¡¡¡¡ÔõôÈóÌÐòÀûÓÃËÑË÷ÒýÇæÀ´ËѼ¯ÍøÖ·£¬ÕâÓÐʲôÓÃ?ºÜÓÐÓÃ!ÍøÉ϶¯éüÓÐÈ˽ÐÂôÍøÖ·Êý¾Ý¿â£¬Èç·¢²¼Èí¼þÍøÖ·¡¢ÓʼþµØÖ·¡¢ÂÛÌ³ÍøÖ·¡¢ÐÐÒµÍøÖ·£¬ÕâÐ©ÍøÖ·ÊÇÔõôÀ´µÄÄØ?²»¿ÉÄÜÊÇÈËÊÖ¹¤ÊÕ¼¯¶øÀ´µÄ£¬¶¼ÊÇÈóÌÐòÀûÓÃËÑË÷ÒýÇæÈ¡µ½µÄ£¬Èç¹ûÄúÐèҪijÀàÍøÖ·ÐÅÏ¢Êý¾Ý£¬¾Í¸ú³É¶¼ÀÊÎÖ½ÌÓýÀ´Ò»ÆðÑо¿Ò»Ï£¬·Ç³£¼òµ¥¡£
¡¡¡¡±¾ÎIJÉÓÃJavaÓïÑÔÐ ......

¹ØÓÚÒÔThinking in JavaΪ¿Î±¾µÄJava½ÌÓëѧµÄ·½·¨

    ÔÚĿǰµÄ¹ØÓÚjava×ÔѧµÄÌÖÂÛÖУ¬×î¾­³£¿´µ½µÄ¾ÍÊÇ×êÑС¶Thinking in java¡·(TIJ)µÄ¾­Ñ飬µ«ÊÇ£¬¾¡¹ÜʹÓÃTIJ×÷Ϊ½Ìѧ²ÄÁϵĽÌѧÐÐΪҲºÜ¶à£¬ÎÒÈ´ÉÐδ·¢ÏÖÓдӽÌʦ¹ØÓÚÈçºÎ½«TIJÓÃÓÚ½ÌѧµÄÂÛÊö¡£Îª´Ë£¬ÎÒȨ×÷Å×שÒýÓñ¡£
 
    Ê×ÏÈ£¬ÎªÊ²Ã´ÒªÑ§Ï°java£¿°´ÕÕEckelµÄ»°Ëµ£¬ ......

Java×Ö·û´®Ê¹ÓÃ×ܽá

      Java×Ö·û´®Ê¹ÓÃ×ܽá
      
      ǰÑÔ£º
      ÕâÆªÎÄÕµÄÄ¿µÄÊÇÌáÐÑ´ó¼Ò¶Ô×Ö·û´®ÈýÖÖÀàÐÍ×ö¸ö×ۺϵıȽϣ¬Ê¹µÃÔÚʹÓÃ×Ö·û´®ÈýÖÖÀàµÄʱºòÓиöÑ¡ÔñÒÀ¾Ý£¬ÕâÑù¿ÉÒÔ¼«´óÌá¸ß³ÌÐòÔËÐеÄЧÂÊ¡£Èç¹ûÄã¶ÔÕâ ......

java¶ÁÎļþ

import java.io.*;
public class FileReaderSample {
  public static void main(String args[]) throws IOException
  {
    // ½¨Á¢¿ÉÈÝÄÉ1024¸ö×Ö·ûµÄÊý×é
    char data[]=new char[1024];
    // ½¨Á¢¶ÔÏófr
    FileReader fr= ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ