Examples of TypeName


Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

public class TestIFEQ extends MyTestCase {
  public ClassDef defadd(String type,int i1,int i2) {
    ClassDef cd = makeClassDef() ;
    Var x = new Var(i1,new TypeName(type)) ;
    Var y = new Var(i2,new TypeName(type)) ;
    MethodDef md = new MethodDef(TypeName.BOOLEAN,"meth",x,y) ;
    Mark one = new Mark() ;
    md = md.addInstructions(
        new Load(x),
        new Load(y),
View Full Code Here

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

public class TestIFGE extends MyTestCase {
  public ClassDef defadd(String type,int i1,int i2) {
    ClassDef cd = makeClassDef() ;
    Var x = new Var(i1,new TypeName(type)) ;
    Var y = new Var(i2,new TypeName(type)) ;
    MethodDef md = new MethodDef(TypeName.BOOLEAN,"meth",x,y) ;
    Mark one = new Mark() ;
    md = md.addInstructions(
        new Load(x),
        new Load(y),
View Full Code Here

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

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

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

public class TestArrLd extends MyTestCase {
  public ClassDef defadd(String type) {
    ClassDef cd = makeClassDef() ;
    FieldDef fd = new FieldDef(Scope.PUBLIC,new TypeName(type),"foo") ;
    fd = fd.setStatic(true) ;
    cd = cd.addField(fd) ;
    {
      Var x = new Var(0,new TypeName(type+"[]")) ;
      Var y = new Var(1,TypeName.INT) ;
      MethodDef md = new MethodDef(new TypeName(type),"getFoo",x,y) ;
      md = md.setStatic(true) ;
      md = md.addInstructions(
          new Load(x),
          new Load(y),
          new Load(new ArrLValue(new TypeName(type))),
          new Return(TypeCode.getType(type))
          ) ;
      cd = cd.addMethod(md) ;
    }
    return cd ;
View Full Code Here

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

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

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

public class TestIFLT0 extends MyTestCase {
  public ClassDef defadd(String type,int i1) {
    ClassDef cd = makeClassDef() ;
    Var x = new Var(i1,new TypeName(type)) ;
    MethodDef md = new MethodDef(TypeName.BOOLEAN,"meth",x) ;
    Mark one = new Mark() ;
    md = md.addInstructions(
        new Load(x),
        new IfLessThan0(TypeCode.getType(type),one),
View Full Code Here

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

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

Examples of org.allspice.bytecode.TypeName

import org.allspice.bytecode.instructions.Return;

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

Examples of org.apache.ibatis.submitted.enumtypehandler_on_map.PersonMapper.TypeName

    }
    @Test
    public void testEnumWithoutParam() {
        SqlSession sqlSession = sqlSessionFactory.openSession();
        PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
        List<Person> persons = personMapper.getByTypeNoParam(new TypeName() {
            public String getName() {
                return "";
            }
            public Type getType() {
                return Person.Type.PERSON;
View Full Code Here

Examples of org.apache.ibatis.submitted.enumtypehandler_on_map.PersonMapper.TypeName

    }
    @Test
    public void testEnumWithoutParam() {
        SqlSession sqlSession = sqlSessionFactory.openSession();
        PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
        List<Person> persons = personMapper.getByTypeNoParam(new TypeName() {
            public String getName() {
                return "";
            }
            public Type getType() {
                return Person.Type.PERSON;
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.