网上找到个描述的很精妙的例子

Child   <-   many-to-one   ->Parent   
    
  class   Child   {   
      private   Parent   parent;   
    
      public   Parent   getParent   (){   
          return   this.parent;//访问了实例变量   
      }   
        
  }   
    
  class   Parent   {   
      private   String   name;   
    
      public   String   getName(){   
          return   this.name;//访问了实例变量   
      }   
    
      public   void   f(){   
          System.out.println("invokeing   f()");//没有访问实例变量   
      }   
  }   
    
  如果   many-to-one  
的lazy设为proxy,当child.getParent().getName()或child.getParent().f()时,parent都
会被抓取,若设为no-proxy,调用child.getParent().f()时,parent是不会被抓取的,同时这种方式需要编译时字节码增
强,否则和proxy没区别。

更多详情请关注 http://www.cnblogs.com/baixingqiang

Child <- many-to-one ->Parent的更多相关文章

  1. java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

    在ViewPager中,用Fragment显示页面时,报错: java.lang.IllegalStateException: The specified child already has a pa ...

  2. The specified child already has a parent错误

    10-05 23:39:48.187: E/AndroidRuntime(12854): Caused by: java.lang.IllegalStateException: The specifi ...

  3. bug_ _fragment_“The specified child already has a parent. You must call removeView"的解决以及产生的原因

    这个异常的出现往往是因为非法使用了某些方法引起的. 从字面意思上是说这个特定的child已经有一个parent了,你必须在这个parent中首先调用removeView()方法,才能继续你的内容.这里 ...

  4. 关于报错The specified child already has a parent的解决办法

    报错信息为:java.lang.IllegalStateException: The specified child already has a parent. You must call remov ...

  5. Android IllegalStateException: The specified child already has a parent问题解决办法

    最近遇到一个很让人头疼的问题,使用viewpager动态添加页面或者删除页面时出现了问题(java.lang.IllegalStateException: The specified child al ...

  6. Pass value from child popup window to parent page window using JavaScript--reference

    Here Mudassar Ahmed Khan has explained how to pass value from child popup window to parent page wind ...

  7. 安卓java.lang.IllegalStateException: The specified child already has a parent.解决方案

    在使用ViewPager的时候遇到一个错误java.lang.IllegalStateException: The specified child already has a parent. You ...

  8. android 异常信息The specified child already has a parent. You must call removeView() on the child's parent first. 的处理方法

    [Android异常信息]: The specified child already has a parent. You must call removeView() on the child's p ...

  9. fragment The specified child already has a parent. You must call removeView()

    在切换Fragment的时候出现:The specified child already has a parent. You must call removeView()异常. 错误主要出在Fragm ...

  10. java.lang.IllegalStateException: The specified child already has a parent. You must call removeView

     java.lang.IllegalStateException: The specified child already has a parent. You must call removeVi ...

随机推荐

  1. js动态的把左边列表添加到右边,可删除。

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. 《数据结构与算法Python语言描述》习题第二章第三题(python版)

    ADT Rational: #定义有理数的抽象数据类型 Rational(self, int num, int den) #构造有理数num/den +(self, Rational r2) #求出本 ...

  3. Java实现Mysql数据库自动备份

    最近项目中有一个这样的需求,要求定时备份数据库.看了一些网上的资料,了解到主要思路是是使用java中的Runtime类的exec()方法,可以直接调用windows的cmd命令,参数就是Mysql的备 ...

  4. GJM :C#开发 异步处理是目的,多线程是手段

    但是BeginAccept和EndAccept不就是system.net.socket封装好的异步socket吗如果用多线程来实现的话那就不叫异步了吧 1.再次强调,异步是目的,多线程是手段. 所谓异 ...

  5. SpringMVC解决乱码

    SpringMVC解决乱码 在web.xml中配置如下代码

  6. mysql,SQL标准,多表查询中内连接,外连接,自然连接等详解之查询结果集的笛卡尔积的演化

    先附上数据. CREATE TABLE `course` ( `cno` ) NOT NULL, `cname` ) CHARACTER SET utf8 NOT NULL, `ctime` ) NO ...

  7. SharePoint 2013 图文开发系列之网站栏

    网站栏的本质,就是一个xml的描述文件,所以创建过程,基本就是通过Feature部署一个Xml文件,然后修改Xml文件的网站栏描述. 1.添加新项目,选择SharePoint 2013 空项目,如下图 ...

  8. Android高效计算——RenderScript(二)

    3 RenderScript运行时层与反射层 3.1 RenderScript运行时层 RenderScript运行时层是指.rs代码运行时所在的层级.当对安卓项目进行编译的时候,.rs或者.rsh中 ...

  9. python之(re)正则表达式上

    python正则表达式知识预备 正则表达式使用反斜杠" \ "来代表特殊形式或用作转义字符,这里跟Python的语法冲突,因此,Python用" \\\\ "表 ...

  10. android handler ,message消息发送方式

    1.Message msg =  Message.obtain(mainHandler) msg.obj=obj;//添加你需要附加上去的内容 msg.what = what;//what消息处理的类 ...