/** * Return the name of the class only, without package. */ public String getClassName() { String name = _project.getNameCache().getExternalForm(getName(), true); return name.substring(name.lastIndexOf('.') + 1); }
/** * Return the name of the class only, without package. */ public String getClassName() { String name = _project.getNameCache().getExternalForm(getName(), true); return name.substring(name.lastIndexOf('.') + 1); }
/** * Return the package name only, without class, or null if none. */ public String getPackageName() { String name = _project.getNameCache().getExternalForm(getName(), true); int index = name.lastIndexOf('.'); if (index == -1) return null; return name.substring(0, index); }
public TypedInstruction setType(String type) { type = getProject().getNameCache().getExternalForm(type, false); return setWide(long.class.getName().equals(type) || double.class.getName().equals(type)); }
/** * Add an interface to those declared by this class. */ public void declareInterface(String name) { Integer index = Numbers.valueOf(getPool().findClassEntry(_project. getNameCache().getInternalForm(name, false), true)); List interfaces = _state.getInterfacesHolder(); if (!interfaces.contains(index)) interfaces.add(index); }
/** * Add an interface to those declared by this class. */ public void declareInterface(String name) { Integer index = Numbers.valueOf(getPool().findClassEntry(_project. getNameCache().getInternalForm(name, false), true)); List interfaces = _state.getInterfacesHolder(); if (!interfaces.contains(index)) interfaces.add(index); }
/** * Add a field to this class. * * @return the added field */ public BCField declareField(String name, String type) { BCField field = new BCField(this); _state.getFieldsHolder().add(field); field.initialize(name, _project.getNameCache().getInternalForm(type, true)); return field; }
/** * Set the return type of this method. */ public void setReturn(String name) { setDescriptor(getProject().getNameCache().getDescriptor(name, getParamNames())); }
/** * Set the class value of this property. */ private void setClassNameValue(Value val, String o) { o = getProject().getNameCache().getInternalForm(o, true); val.index = getPool().findUTF8Entry(o, true); val.index2 = -1; val.value = null; val.type = Class.class; }
public TypedInstruction setType(String type) { if (type == null) _index = 0; else { type = getProject().getNameCache().getInternalForm(type, false); _index = getPool().findClassEntry(type, true); } return this; }
/** * Set the class value of this property. */ private void setClassNameValue(Value val, String o) { o = getProject().getNameCache().getInternalForm(o, true); val.index = getPool().findUTF8Entry(o, true); val.index2 = -1; val.value = null; val.type = Class.class; }
/** * Set the type of class being loaded. * * @return the first Instruction of the block added by setting the type * @throws IllegalStateException if type has already been set */ public Instruction setClass(String name) { name = _class.getProject().getNameCache().getExternalForm(name, false); setClassName(name, getWrapperClass(name)); return _ins; }
public String getTypeName() { if (_index == 0) return null; ClassEntry entry = (ClassEntry) getPool().getEntry(_index); return getProject().getNameCache().getExternalForm(entry. getNameEntry().getValue(), false); }
public String getTypeName() { if (_index == 0) return null; ClassEntry entry = (ClassEntry) getPool().getEntry(_index); return getProject().getNameCache().getExternalForm(entry. getNameEntry().getValue(), false); }
/** * Set the type of this declaring class. */ public void setDeclarer(String type) { if (type == null) setDeclarerIndex(0); else { type = getProject().getNameCache().getInternalForm(type, false); setDeclarerIndex(getPool().findClassEntry(type, true)); } }
/** * Set the type of this inner class. */ public void setType(String type) { if (type == null) setTypeIndex(0); else { type = getProject().getNameCache().getInternalForm(type, false); setTypeIndex(getPool().findClassEntry(type, true)); } }
/** * Return the full name of the local's type, or null if unset. */ public String getTypeName() { if (getTypeIndex() == 0) return null; UTF8Entry entry = (UTF8Entry) getPool().getEntry(getTypeIndex()); return getProject().getNameCache().getExternalForm(entry.getValue(), false); }
/** * Set the descriptor of this member. */ public void setDescriptor(String desc) { String origDesc = getDescriptor(); // reset the desc desc = getProject().getNameCache().getInternalForm(desc, true); _descriptorIndex = getPool().findUTF8Entry(desc, true); // change all the references in the owning class setEntry(getName(), origDesc); }
/** * Set the descriptor of this member. */ public void setDescriptor(String desc) { String origDesc = getDescriptor(); // reset the desc desc = getProject().getNameCache().getInternalForm(desc, true); _descriptorIndex = getPool().findUTF8Entry(desc, true); // change all the references in the owning class setEntry(getName(), origDesc); }
/** * Return the full name of the inner class, or null if unset. */ public String getTypeName() { if (getTypeIndex() == 0) return null; ClassEntry entry = (ClassEntry) getPool().getEntry(getTypeIndex()); return getProject().getNameCache().getExternalForm(entry.getNameEntry(). getValue(), false); }