Examples of MethodDef


Examples of org.allspice.bytecode.MethodDef

   
    FieldDef fd = new FieldDef(Scope.PUBLIC,new TypeName(type),"foo") ;
    cd = cd.addField(fd) ;
    {
      Var x = new Var(1,new TypeName(type)) ;
      MethodDef md = new MethodDef(TypeName.VOID,"setFoo",x) ;
      md = md.addInstructions(
          new Load(new Var(0,new TypeName("TestClass"))),
          new Load(x),
          new Store(new FieldRef(cd.name,new TypeName(type),"foo")),
          new Return(TypeCode.VOID)
          ) ;
      cd = cd.addMethod(md) ;
    }
    {
      MethodDef md = new MethodDef(new TypeName(type),"getFoo") ;
      md = md.addInstructions(
          new Load(new Var(0,new TypeName("TestClass"))),
          new Load(new FieldRef(cd.name,new TypeName(type),"foo")),
          new Return(TypeCode.getType(type))
          ) ;
      cd = cd.addMethod(md) ;
View Full Code Here

Examples of org.allspice.bytecode.MethodDef

public class TestCompare extends MyTestCase {
  public ClassDef defadd(String type,int i1) {
    ClassDef cd = makeClassDef() ;
    Var x = new Var(1,new TypeName(type)) ;
    Var y = new Var(i1,new TypeName(type)) ;
    MethodDef md = new MethodDef(TypeName.INT,"meth",x,y) ;
    md = md.addInstructions(
        new Load(x),
        new Load(y),
        new Compare(TypeCode.getType(type)),
        new Return(TypeCode.INT)
        ) ;
View Full Code Here

Examples of org.fcrepo.server.storage.types.MethodDef

     *
     * @return an array of method defintions
     */
    public static MethodDef[] reflectMethods() {
        ArrayList<MethodDef> methodList = new ArrayList<MethodDef>();
        MethodDef method = null;

        method = new MethodDef();
        method.methodName = "viewObjectProfile";
        method.methodLabel = "View description of the object";
        method.methodParms = new MethodParmDef[0];
        methodList.add(method);

        method = new MethodDef();
        method.methodName = "viewMethodIndex";
        method.methodLabel =
                "View a list of dissemination methods in the object";
        method.methodParms = new MethodParmDef[0];
        methodList.add(method);

        method = new MethodDef();
        method.methodName = "viewItemIndex";
        method.methodLabel = "View a list of items in the object";
        method.methodParms = new MethodParmDef[0];
        methodList.add(method);

        method = new MethodDef();
        method.methodName = "viewDublinCore";
        method.methodLabel = "View the Dublin Core record for the object";
        method.methodParms = new MethodParmDef[0];
        methodList.add(method);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.