本文整理了Java中serp.bytecode.BCClass.getName()
方法的一些代码示例,展示了BCClass.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BCClass.getName()
方法的具体详情如下:
包路径:serp.bytecode.BCClass
类名称:BCClass
方法名:getName
[英]Return the name of this class, including package name. The name will be in a form suitable for a Class#forName call.
[中]返回此类的名称,包括包名称。名称将采用适合类#forName调用的形式。
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Remove the annotation of the given type.
*
* @return true if an annotation was removed, false otherwise
*/
public boolean removeAnnotation(BCClass type) {
return type != null && removeAnnotation(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the declaring type of the method this instruction operates on.
*
* @return this instruction, for method chaining
*/
public MethodInstruction setMethodDeclarer(BCClass type) {
String name = null;
if (type != null)
name = type.getName();
return setMethodDeclarer(name);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Change a parameter type of this method.
*
* @see java.util.List#set(int,Object)
*/
public void setParam(int pos, BCClass type) {
setParam(pos, type.getName());
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Return true if this class or any of its superclasses implement/extend
* the given interface/class.
* This method does not recurse into interfaces-of-interfaces.
*/
public boolean isInstanceOf(BCClass type) {
if (type == null)
return false;
return isInstanceOf(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Add a local to this table.
*/
public LocalVariable addLocalVariable(String name, BCClass type) {
String typeName = (type == null) ? null : type.getName();
return addLocalVariable(name, typeName);
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the class value of this property.
*/
public void setValue(BCClass value) {
setClassNameValue(value.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set this property value to a new annotation of the given type,
* returning the annotation for manipulation.
*/
public Annotation newAnnotationValue(BCClass type) {
return newAnnotationValue(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the return type of the method this instruction operates on.
*
* @return this instruction, for method chaining
*/
public MethodInstruction setMethodReturn(BCClass type) {
String name = null;
if (type != null)
name = type.getName();
return setMethodReturn(name);
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Remove an interface declared by this class.
*
* @return true if the class had the interface, false otherwise
*/
public boolean removeDeclaredInterface(BCClass type) {
if (type == null)
return false;
return removeDeclaredInterface(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Add a field to this class.
*
* @return the added field
*/
public BCField declareField(String name, BCClass type) {
String typeName = (type == null) ? null : type.getName();
return declareField(name, typeName);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* 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);
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* 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);
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the type of this instruction. Types that have no direct
* support will be converted accordingly.
*
* @return this instruction, for method chaining
*/
public TypedInstruction setType(BCClass type) {
if (type == null)
return setType((String) null);
return setType(type.getName());
}
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the type of this local.
*/
public void setType(BCClass type) {
if (type == null)
setType((String) null);
else
setType(type.getName());
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
/**
* Set the superclass of this class.
*/
public void setSuperclass(BCClass type) {
if (type == null)
setSuperclass((String) null);
else
setSuperclass(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Remove the exception handler that catches the given type.
*
* @return true if the handler was removed, false otherwise
*/
public boolean removeExceptionHandler(BCClass catchType) {
if (catchType == null)
return removeExceptionHandler((String) null);
return removeExceptionHandler(catchType.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the type being converted from. Types that have no direct
* support will be converted accordingly.
*
* @return this instruction, for method chaining
*/
public ConvertInstruction setFromType(BCClass type) {
if (type == null)
return setFromType((String) null);
return setFromType(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the class of the exception type, or null for catch-all clauses used
* for finally blocks.
*/
public void setCatch(BCClass type) {
if (type == null)
setCatch((String) null);
else
setCatch(type.getName());
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the value of this constant.
*
* @return this instruction, for method chaining
*/
public ConstantInstruction setValue(BCClass value) {
if (value == null)
return setNull();
calculateOpcode(value.getName(), true, false);
return this;
}
代码示例来源:origin: net.sourceforge.serp/serp
/**
* Set the method this instruction operates on.
*
* @return this instruction, for method chaining
*/
public MethodInstruction setMethod(BCMethod method) {
if (method == null)
return setMethodIndex(0);
return setMethod(method.getDeclarer().getName(), method.getName(),
method.getReturnName(), method.getParamNames(), false);
}
内容来源于网络,如有侵权,请联系作者删除!