📄 alphaagent.java
字号:
package com.croftsoft.apps.vaft.agent;
import java.io.Serializable;
import com.croftsoft.core.role.actor.Actor;
/*********************************************************************
* <P>
* @author
* <A HREF="http://www.alumni.caltech.edu/~croft">David W. Croft</A>
* @version
* 1998-04-26
*********************************************************************/
public class AlphaAgent implements Actor, Runnable, Serializable {
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
public String message;
//////////////////////////////////////////////////////////////////////
// Initializers
//////////////////////////////////////////////////////////////////////
static
//////////////////////////////////////////////////////////////////////
{
System.out.println ( "First time to load class AlphaAgent." );
}
//////////////////////////////////////////////////////////////////////
// Instance initializer
//////////////////////////////////////////////////////////////////////
{
System.out.println ( "Creating AlphaAgent instance in memory." );
}
//////////////////////////////////////////////////////////////////////
// Constructor method
//////////////////////////////////////////////////////////////////////
public AlphaAgent ( )
//////////////////////////////////////////////////////////////////////
{
message = "ABC";
}
//////////////////////////////////////////////////////////////////////
// Interface methods
//////////////////////////////////////////////////////////////////////
public String [ ] getRoles ( )
//////////////////////////////////////////////////////////////////////
{
return new String [ ] { "java.lang.Runnable" };
}
public void run ( )
//////////////////////////////////////////////////////////////////////
{
System.out.println ( message );
}
//////////////////////////////////////////////////////////////////////
// Finalize method
//////////////////////////////////////////////////////////////////////
public void finalize ( ) throws Throwable
//////////////////////////////////////////////////////////////////////
{
System.out.println ( "Removing AlphaAgent instance from memory." );
super.finalize ( );
}
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -