]> source.dussan.org Git - aspectj.git/commitdiff
chewed by formatter
authoraclement <aclement>
Thu, 28 Aug 2008 00:05:57 +0000 (00:05 +0000)
committeraclement <aclement>
Thu, 28 Aug 2008 00:05:57 +0000 (00:05 +0000)
bcel-builder/src/org/aspectj/apache/bcel/generic/BasicType.java

index 1d2f4daa50ce7d6cd914d16644b1a6a9e624674e..477fb1dfff628bc7fb8584c85123d79df83468d9 100644 (file)
@@ -55,47 +55,57 @@ package org.aspectj.apache.bcel.generic;
  */
 import org.aspectj.apache.bcel.Constants;
 
-/** 
+/**
  * Denotes basic type such as int.
- *
- * @version $Id: BasicType.java,v 1.3 2008/05/28 23:52:57 aclement Exp $
- * @author  <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
+ * 
+ * @version $Id: BasicType.java,v 1.4 2008/08/28 00:05:57 aclement Exp $
+ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
  */
 public final class BasicType extends Type {
-  /**
-   * Constructor for basic types such as int, long, `void'
-   *
-   * @param type one of T_INT, T_BOOLEAN, ..., T_VOID
-   * @see org.aspectj.apache.bcel.Constants
-   */
-  BasicType(byte type) {
-    super(type, Constants.SHORT_TYPE_NAMES[type]);
+       /**
+        * Constructor for basic types such as int, long, `void'
+        * 
+        * @param type one of T_INT, T_BOOLEAN, ..., T_VOID
+        * @see org.aspectj.apache.bcel.Constants
+        */
+       BasicType(byte type) {
+               super(type, Constants.SHORT_TYPE_NAMES[type]);
 
-    if((type < Constants.T_BOOLEAN) || (type > Constants.T_VOID))
-      throw new ClassGenException("Invalid type: " + type);
-  }
+               if (type < Constants.T_BOOLEAN || type > Constants.T_VOID) {
+                       throw new ClassGenException("Invalid type: " + type);
+               }
+       }
 
-  public static final BasicType getType(byte type) {
-    switch(type) {
-    case Constants.T_VOID:    return VOID;
-    case Constants.T_BOOLEAN: return BOOLEAN;
-    case Constants.T_BYTE:    return BYTE;
-    case Constants.T_SHORT:   return SHORT;
-    case Constants.T_CHAR:    return CHAR;
-    case Constants.T_INT:     return INT;
-    case Constants.T_LONG:    return LONG;
-    case Constants.T_DOUBLE:  return DOUBLE;
-    case Constants.T_FLOAT:   return FLOAT;
+       public static final BasicType getType(byte type) {
+               switch (type) {
+               case Constants.T_VOID:
+                       return VOID;
+               case Constants.T_BOOLEAN:
+                       return BOOLEAN;
+               case Constants.T_BYTE:
+                       return BYTE;
+               case Constants.T_SHORT:
+                       return SHORT;
+               case Constants.T_CHAR:
+                       return CHAR;
+               case Constants.T_INT:
+                       return INT;
+               case Constants.T_LONG:
+                       return LONG;
+               case Constants.T_DOUBLE:
+                       return DOUBLE;
+               case Constants.T_FLOAT:
+                       return FLOAT;
 
-    default:
-      throw new ClassGenException("Invalid type: " + type);
-    }
-  }
+               default:
+                       throw new ClassGenException("Invalid type: " + type);
+               }
+       }
 
-  /** @return true if both type objects refer to the same type
-   */
-  public boolean equals(Object type) {
-    return (type instanceof BasicType)?
-      ((BasicType)type).type == this.type : false;
-  }
+       /**
+        * @return true if both type objects refer to the same type
+        */
+       public boolean equals(Object type) {
+               return type instanceof BasicType ? ((BasicType) type).type == this.type : false;
+       }
 }