public static ObjectType getObjectTypeInstance(@DottedClassName String className) { return ObjectType.getInstance(className); }
public static ObjectType getInstance(@DottedClassName String s) { if (FindBugs.DEBUG && s.startsWith("[")) { throw new IllegalArgumentException("Cannot create an ObjectType to represent an array type: " + s); } if (s.endsWith(";")) { throw new IllegalArgumentException(s); } if (s.indexOf('/') >= 0) { s = s.replace('/', '.'); } Map<String, ObjectType> map = instance.get(); ObjectType result = map.get(s); if (result != null) { return result; } result = ObjectType.getInstance(s); map.put(s, result); return result; }
/** * Convenience constructor for reference array type, e.g. Object[] * * @param class_name complete name of class (java.lang.String, e.g.) */ public ArrayType(final String class_name, final int dimensions) { this(ObjectType.getInstance(class_name), dimensions); }
public static ObjectType getObjectTypeInstance(@DottedClassName String className) { return ObjectType.getInstance(className); }
/** @return type of the referenced class/interface * @deprecated If the instruction references an array class, * the ObjectType returned will be invalid. Use * getReferenceType() instead. */ @Deprecated public ObjectType getClassType( final ConstantPoolGen cpg ) { return ObjectType.getInstance(getClassName(cpg)); }
/** * Set (optional) initial value of field, otherwise it will be set to null/0/false * by the JVM automatically. */ public void setInitValue( final String str ) { checkType( ObjectType.getInstance("java.lang.String")); if (str != null) { value = str; } }
public NEW createNew( final String s ) { return createNew(ObjectType.getInstance(s)); }
public static ObjectType getInstance(@DottedClassName String s) { if (FindBugs.DEBUG && s.startsWith("[")) { throw new IllegalArgumentException("Cannot create an ObjectType to represent an array type: " + s); } if (s.endsWith(";")) { throw new IllegalArgumentException(s); } if (s.indexOf('/') >= 0) { s = s.replace('/', '.'); } Map<String, ObjectType> map = instance.get(); ObjectType result = map.get(s); if (result != null) { return result; } result = ObjectType.getInstance(s); map.put(s, result); return result; }
return ObjectType.getInstance(cl.getName());
/** * Return the reference type representing the class, interface, * or array class referenced by the instruction. * @param cpg the ConstantPoolGen used to create the instruction * @return an ObjectType (if the referenced class type is a class * or interface), or an ArrayType (if the referenced class * type is an array class) */ public ReferenceType getReferenceType( final ConstantPoolGen cpg ) { final ConstantPool cp = cpg.getConstantPool(); final ConstantCP cmr = (ConstantCP) cp.getConstant(super.getIndex()); String className = cp.getConstantString(cmr.getClassIndex(), Const.CONSTANT_Class); if (className.startsWith("[")) { return (ArrayType) Type.getType(className); } className = className.replace('/', '.'); return ObjectType.getInstance(className); }
return ObjectType.getInstance(parsedSignature.replace('/', '.'));
for (final JavaClass this_sup : this_sups) { if (this_sup.equals(t_sup)) { return ObjectType.getInstance(this_sup.getClassName());
for (final JavaClass this_sup : this_sups) { if (this_sup.equals(t_sup)) { return ObjectType.getInstance(this_sup.getClassName());
if ( !mg.isStatic() ) { if (mg.getName().equals(Const.CONSTRUCTOR_NAME)) { Frame.setThis(new UninitializedObjectType(ObjectType.getInstance(jc.getClassName()))); f.getLocals().set(0, Frame.getThis()); f.getLocals().set(0, ObjectType.getInstance(jc.getClassName()));
addLocalVariable("this", ObjectType.getInstance(class_name), start, end);
final ObjectType curr = ObjectType.getInstance(mg.getClassName());
final ObjectType curr = ObjectType.getInstance(mg.getClassName());
if (T.equals(ObjectType.getInstance(element))) { return true;
final String cen = m.getConstantPool().getConstantString(type, Const.CONSTANT_Class); c_type = ObjectType.getInstance(cen);