cvs commit: jakarta-bcel/src/java/org/apache/bcel/generic InstructionFactory.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
mdahm       2002/06/29 08:15:14

  Modified:    src/java/org/apache/bcel/generic InstructionFactory.java
  Log:
  added createInstanceOf
  
  Revision  Changes    Path
  1.5       +8 -1      jakarta-bcel/src/java/org/apache/bcel/generic/InstructionFactory.java
  
  Index: InstructionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/generic/InstructionFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InstructionFactory.java	10 Apr 2002 07:40:59 -0000	1.4
  +++ InstructionFactory.java	29 Jun 2002 15:15:14 -0000	1.5
  @@ -525,6 +525,13 @@
         return new CHECKCAST(cp.addClass((ObjectType)t));
     }
   
  +  public INSTANCEOF createInstanceOf(ReferenceType t) {
  +    if(t instanceof ArrayType)
  +      return new INSTANCEOF(cp.addArrayClass((ArrayType)t));
  +    else
  +      return new INSTANCEOF(cp.addClass((ObjectType)t));
  +  }
  +
     public NEW createNew(ObjectType t) {
       return new NEW(cp.addClass(t));
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.