org.hibernate.property.Getter.getMethodName()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.hibernate.property.Getter.getMethodName()方法的一些代码示例,展示了Getter.getMethodName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Getter.getMethodName()方法的具体详情如下:
包路径:org.hibernate.property.Getter
类名称:Getter
方法名:getMethodName

Getter.getMethodName介绍

[英]Retrieve the getter-method name.

Optional operation (return null)
[中]检索getter方法名称。
可选操作(返回null)

代码示例

代码示例来源:origin: hibernate/hibernate

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[i].getMethodName();
  setterNames[i] = setters[i].getMethodName();
  propTypes[i] = getters[i].getReturnType();

代码示例来源:origin: hibernate/hibernate

protected AbstractComponentTuplizer(Component component) {
  
  propertySpan = component.getPropertySpan();
  
  getters = new Getter[propertySpan];
  setters = new Setter[propertySpan];
  Iterator iter = component.getPropertyIterator();
  boolean foundCustomAccessor=false;
  int i=0;
  while ( iter.hasNext() ) {
    Property prop = (Property) iter.next();
    getters[i] = buildGetter(component, prop);
    setters[i] = buildSetter(component, prop);
    if ( !prop.isBasicPropertyAccessor() ) foundCustomAccessor = true;
    i++;
  }
  hasCustomAccessors = foundCustomAccessor;
  
  String[] getterNames = new String[propertySpan];
  String[] setterNames = new String[propertySpan];
  Class[] propTypes = new Class[propertySpan];
  for ( int j = 0; j < propertySpan; j++ ) {
    getterNames[j] = getters[j].getMethodName();
    setterNames[j] = setters[j].getMethodName();
    propTypes[j] = getters[j].getReturnType();
  }
  instantiator = buildInstantiator(component);
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[i].getMethodName();
  setterNames[i] = setters[i].getMethodName();
  propTypes[i] = getters[i].getReturnType();

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[i].getMethodName();
  setterNames[i] = setters[i].getMethodName();
  propTypes[i] = getters[i].getReturnType();

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[ i ].getMethodName();
  setterNames[i] = setters[ i ].getMethodName();
  propTypes[i] = getters[ i ].getReturnType();

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[ i ].getMethodName();
  setterNames[i] = setters[ i ].getMethodName();
  propTypes[i] = getters[ i ].getReturnType();

代码示例来源:origin: org.nakedobjects.plugins/hibernate-hibernate

@Test
public void happyCase() {
  final UserAccessor accessor = new UserAccessor();
  final Getter getter = accessor.getGetter(TestObject.class, PropertyHelper.MODIFIED_BY);
  assertNotNull(getter);
  assertNull("getMethod", getter.getMethod());
  assertNull("getMethodName", getter.getMethodName());
}

代码示例来源:origin: hibernate/hibernate

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[i].getMethodName();
  setterNames[i] = setters[i].getMethodName();
  propTypes[i] = getters[i].getReturnType();

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[i].getMethodName();
  setterNames[i] = setters[i].getMethodName();
  propTypes[i] = getters[i].getReturnType();

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

Class[] propTypes = new Class[propertySpan];
for ( int i = 0; i < propertySpan; i++ ) {
  getterNames[i] = getters[i].getMethodName();
  setterNames[i] = setters[i].getMethodName();
  propTypes[i] = getters[i].getReturnType();

代码示例来源:origin: org.nakedobjects.plugins/hibernate-hibernate

@Ignore("need to convert, was originally written for the old value holder design (TextString, etc)")
@Test
public void happyCase() {
  obj.setString(expected);
  NakedPropertyAccessor accessor = new NakedPropertyAccessor();
  Getter getter = accessor.getGetter(SimpleObject.class, "string");
  assertNotNull(getter);
  assertNull("getMethod", getter.getMethod());
  assertNull("getMethodName", getter.getMethodName());
  assertEquals("return type", String.class, getter.getReturnType());
}

相关文章