本文整理汇总了C++中JPCleaner::addAllLocal方法的典型用法代码示例。如果您正苦于以下问题:C++ JPCleaner::addAllLocal方法的具体用法?C++ JPCleaner::addAllLocal怎么用?C++ JPCleaner::addAllLocal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JPCleaner
的用法示例。
在下文中一共展示了JPCleaner::addAllLocal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadSuperInterfaces
void JPClass::loadSuperInterfaces()
{
JPCleaner cleaner;
// Super interfaces
vector<jclass> intf = JPJni::getInterfaces(m_Class);
cleaner.addAllLocal(intf);
for (vector<jclass>::iterator it = intf.begin(); it != intf.end(); it++)
{
JPTypeName intfName = JPJni::getName(*it);
JPClass* intf = JPTypeManager::findClass(intfName);
m_SuperInterfaces.push_back(intf);
}
}
示例2: loadMethods
void JPClass::loadMethods()
{
JPCleaner cleaner;
JPCleaner pcleaner;
// methods
vector<jobject> methods = JPJni::getDeclaredMethods(m_Class);
cleaner.addAllLocal(methods);
for (vector<jobject>::iterator it = methods.begin(); it != methods.end(); it++)
{
string name = JPJni::getMemberName(*it);
if (JPJni::isMemberPublic(*it) && !JPJni::isMemberAbstract(*it) )
{
JPMethod* method = getMethod(name);
if (method == NULL)
{
method = new JPMethod(m_Class, name, false);
m_Methods[name] = method;
}
method->addOverload(this, *it);
}
}
// add previous overloads to methods defined in THIS class
if (m_SuperClass != NULL)
{
for (map<string, JPMethod*>::iterator cur = m_Methods.begin(); cur != m_Methods.end(); cur ++)
{
string name = cur->first;
JPMethod* superMethod = m_SuperClass->getMethod(name);
if (superMethod != NULL)
{
cur->second->addOverloads(superMethod);
}
}
}
}
示例3: loadFields
void JPClass::loadFields()
{
JPCleaner cleaner;
// fields
vector<jobject> fields = JPJni::getDeclaredFields(m_Class);
cleaner.addAllLocal(fields);
for (vector<jobject>::iterator it = fields.begin(); it != fields.end(); it++)
{
JPField* field = new JPField(this, *it);
if (field->isStatic())
{
m_StaticFields[field->getName()] = field;
}
else
{
m_InstanceFields[field->getName()] = field;
}
}
}
示例4: loadConstructors
void JPClass::loadConstructors()
{
JPCleaner cleaner;
m_Constructors = new JPMethod(m_Class, "[init", true);
if (JPJni::isAbstract(m_Class))
{
// NO constructor ...
return;
}
vector<jobject> methods = JPJni::getDeclaredConstructors(m_Class);
cleaner.addAllLocal(methods);
for (vector<jobject>::iterator it = methods.begin(); it != methods.end(); it++)
{
if (JPJni::isMemberPublic(*it))
{
m_Constructors->addOverload(this, *it);
}
}
}